PBA Coursework¶

In [ ]:
#  **********************************************
#  PRACTICAL BUSINESS ANALYTICS (COM3018)
#  COURSEWORK IN MACHINE LEARNING & VISULISATIONS
#  
#  Group Name: Nantendo
#  Anastasia Anichenko
#  Manuel Bradicic
#  Felix Olesen
#  Matthew Samm
#  Michal Sitarz
#  Alex Williams
#
#  Computer Science
#  University of Surrey
#  GUILDFORD
#  Surrey GU2 7XH
#
# ************************************************

# ************************************************
# Required libraries
# ************************************************
# Library from CRAN     Version
# pacman                 0.5.1
# outliers               0.15
# corrplot               0.92
# MASS                   7.3.57
# formattable            0.2.1
# stats                  4.0.3
# PerformanceAnalytics   2.0.4
# plyr                   1.8.7
# dplyr                  1.0.10
# rvest                  1.0.3
# kohonen                3.0.11
# cluster                2.1.3
# ggplot2                3.3.6
# factoextra             1.0.7
# gridExtra              2.3
# igraph                 1.3.5
# inTrees                1.3
# randomForest           4.7.1.1  
# timeDate               4021.106
# timeSeries             4021.105
# keras                  2.9.0
# h2o                    3.38.0.1  
# GGally                 2.1.2              
# tensorflow             2.9.0          
# verification           1.42  
# dtw                    1.23.1  
# proxy                  0.4.27 
# CircStats              0.2.6 
# boot                   1.3.28
# fields                 14.1
# viridis                0.6.2  
# viridisLite            0.4.1 
# spam                   2.9.1   
# smotefamily            1.3.1
# xts                    0.12.1 
# zoo                    1.8.11 
# caret                  6.0.93    
# lattice                0.20.45                                                                
# ************************************************

Global Variables¶

In [ ]:
# ************************************
# Global Environment Variables
# ************************************

# Releasing memory
gc()

# Setting the random seed to be equal each time
set.seed(123)

#  Clearing all of the objects
rm(list=ls())

VIDEOGAME_DATASET         <- "VideoGameSalesData.csv" # Dataset containing video game data
AGE_DATASET               <- "median-age.csv"         # Dataset containing age demographic for each country
GENDER_DATASET            <- "gender-ratio.csv"       # Dataset containing gender demographic for each country
COUNTRY2CONTINENT_DATASET <- "country2continent.csv"  # Dataset mapping countries to continents 
SCRAPED_DATASET           <- "scraped_game_data.csv"  # Dataset of scraped data 

OUTPUT_FIELD              <- "GlobalSales"            # Column to be predicted

MAX_LITERALS              <- 55                       # Max number of unique values in a column to consider one hot encoding

TIME_SLOTS                <- 10                       # Number of back-slots (days) to use as windowed NN input

BASICNN_EPOCHS    <- 100
DEEP_HIDDEN       <- c(30,10)             #Number of neurons in each layer
DEEP_STOPPING     <- 15                   #Number of times no improvement before stop
DEEP_TOLERANCE    <- 1e-4                 #Error threshold
DEEP_ACTIVATION   <- "Tanh"               #Non-linear activation function
DEEP_REPRODUCABLE <- FALSE                #Set to TRUE to test training is same for each run


DATASET_SPLIT             <- 0.7                      # The percentage split of training data vs test data
VALIDATION_SPLIT          <- 0.9                      # The percentage split of training data vs validation data
TRAINING_SPLIT            <- 0.6                      # The percentage split of training data vs test data (used for NNs and DTs)

# The regions must not overlap (as then they are removed from the dataset after being found)
REGIONS <- c('Northern America', 'Japan', 'Europe')                   # Derived from the games dataset
JOINED_NAMES <- c("year", "region", "ageMedian", "femaleRatioMedian") # The desired table columns 

### Scraper Variables

METACRITIC_URL <- "https://www.metacritic.com/game/"  # Website used for scraping

# Platform dictionary; mapping the names from the dataset to the names on the site
PLATFORMS <- c(
    'Wii'='wii',
    'WiiU'='wii-u',
    'DS'='ds',
    '3DS'='3ds',
    'X360'='xbox-360',
    'XOne'='xbox-one',
    'PS2'='playstation-2',
    'PS3'='playstation-3',
    'PS4'='playstation-4',
    'PC'='pc'
)

# Field Types
TYPE_NUMERIC <- "NUMERIC"
TYPE_SYMBOLIC <- "SYMBOLIC"
TYPE_DISCRETE <- "DISCRETE"
TYPE_ORDINAL <- "ORDINAL"

# DiscreteNumeric Cutoff
DN_CUTOFF <- 7

# Outlier Confidence
CONFIDENCE <- 0.95

# Path for a specific part of the website
XPATH_DICT <- c(
    'release_date' = "//li[@class='summary_detail release_data']//span[@class='data']",
    'critic_reviw' = "//span[@itemprop='ratingValue']",
    'user_review_positive' = "//div[@class='metascore_w user large game positive']",
    'user_review_mixed' = "//div[@class='metascore_w user large game mixed']",
    'user_review_negative' = "//div[@class='metascore_w user large game negative']"
)

MYLIBRARIES<-c("outliers",
               "corrplot",
               "MASS",
               "formattable",
               "stats",
               "caret",
               "PerformanceAnalytics",
               "smotefamily",
               "plyr",
               "dplyr",
               "rvest",               
               "kohonen",
               "cluster",
               "ggplot2",
               "factoextra",
               "gridExtra",
               "igraph",
               "verification",
               "tensorflow",
               "keras",
               "GGally",
               "randomForest",
               "h2o",
               "timeSeries",
               "inTrees")
A matrix: 2 × 6 of type dbl
used(Mb)gc trigger(Mb)max used(Mb)
Ncells 62282833.3135251772.3135251772.3
Vcells1159775 8.9838860864.0180108213.8

Functions from Labs¶

In [ ]:
# COM3018 PRACTICAL BUSINESS ANALYTICS
# MACHINE LEARNING & VISULISATIONS
# Prof. Nick F Ryman-Tubb, Dr Spencer Thomas 
# Dept. of Computer Science 
# University of Surrey
# GUILDFORD
# Surrey GU2 7XH
# 2022

# ************************************************
# PREPROCESSING FUNCTIONS
# ************************************************

# ************************************************
# NPREPROCESSING_discreteNumeric() :
#
# Test NUMERIC field if DISCRETE or ORDINAL
#
# INPUT: data frame      - dataset     - input data
#        vector strings  - field_types - Types per field, either {NUMERIC, SYMBOLIC}
#        int             - cutoff      - Number of empty bins needed to determine discrete (1-10)
#
# OUTPUT : vector strings - Updated with types per field {DISCRETE, ORDINAL}
# ************************************************
# Plots histogram for visulisation
# ************************************************
NPREPROCESSING_discreteNumeric<-function(dataset,field_types,cutoff){

  #For every field in our dataset
  for(field in 1:(ncol(dataset))){

    #Only for fields that are all numeric
    if (field_types[field]==TYPE_NUMERIC) {

      #191020NRT use R hist() function to create 10 bins
      histogramAnalysis<-hist(dataset[,field], breaks = 10, plot=FALSE)
      bins<-histogramAnalysis$counts/length(dataset[,field])*100  # Convert to %

      graphTitle<-"AUTO:"

      #If the number of bins with less than 1% of the values is greater than the cutoff
      #then the field is deterimed to be a discrete value

      if (length(which(bins<1.0))>cutoff)
        field_types[field]<-TYPE_DISCRETE
      else
        field_types[field]<-TYPE_ORDINAL

      #Type of field is the chart name
      hist(dataset[,field], breaks = 10, plot=TRUE,
           main=paste(graphTitle,field_types[field]),
           xlab=names(dataset[field]),ylab="Number of Records")

    } #endif numeric types
  } #endof for
  return(field_types)
}

# ************************************************
# NplotOutliers() :
# Scatter plot of field values and colours outliers in red
# INPUT: Vector - sorted    -  points to plot as literal values
#        Vector - outliers  - list of above points that are considered outliers
#        String - fieldName - name of field to plot
# OUTPUT : None
# ************************************************
NplotOutliers<-function(sorted,outliers,fieldName){

  plot(1:length(sorted),sorted,
       pch=1,
       xlab="Unique records",
       ylab=paste("Sorted values",fieldName),
       bty="n")

  if (length(outliers)>0)
    points(outliers,sorted[outliers],col="red",pch=19)
}

# ************************************************
# NPREPROCESSING_removePunctuation()
# INPUT: String - fieldName - name of field
# OUTPUT : String - name of field with punctuation removed
# ************************************************
NPREPROCESSING_removePunctuation<-function(fieldName){
    return(gsub("[[:punct:][:blank:]]+", "", fieldName))
}

# ************************************************
# NPREPROCESSING_outlier() :
#
# Determine if a value of a record is an outlier for each field
#
# INPUT:   data frame    - dataset   - complete data set
#          vector string - field_types  - types per field {ORDINAL, SYMBOLIC, DISCRETE}
#          double        - confidence - Confidence above which is determined an outlier [0,1]
#          string        - operation  = "ignore" = make no changes
#                                     = "mean"   = replace with field mean
#                                     = "remove" = delete the entire record
#
# OUTPUT : data frame - data set with outlier values: ignored, replaced or deleted
#
# 110520NRT - Fixed bug to either replace with MEAN or DELETE records
# 020620NRT - Fixed bug to process all identified outlier records
# ************************************************
# ChiSquared method
# Uses   library(outliers)
# https://cran.r-project.org/web/packages/outliers/outliers.pdfß
NPREPROCESSING_outlier<-function(dataset, field_types, confidence, operation="remove"){

  #For everyfield in our dataset
  for(field in 1:(ncol(dataset))){

    #Only for fields that are all numeric
    if (field_types[field]==TYPE_ORDINAL) {

      #020620NRT  Assign data frame for just this field with the values and TRUE/FALSE  based on confidence level
      justField<-data.frame(v=dataset[,field],outlier=outliers::scores(dataset[,field],type="chisq",prob=abs(confidence)))
      indexToOutliers<-which(justField$outlier)
      numberOfOutliers<-length(indexToOutliers)

      # 020620NRT This sorts the entire dataframe from low values to high
      # and then plot
      sortedData<-justField[order(justField$v),]

      plot(1:nrow(sortedData),sortedData$v,
           pch=1,
           xlab="Records",
           ylab=paste("Sorted values",colnames(dataset)[field]),
           bty="n")

      # If outlier(s) detected then show on the plot and process
      if (numberOfOutliers>0){

        # Highlight outliers as red plots
        indexToSortedOutliers<-which(sortedData$outlier)
        points(indexToSortedOutliers,sortedData$v[indexToSortedOutliers],col="red",pch=19)

        #If found records with outlier values
        switch(operation,

               "mean"= {
                       dataset[indexToOutliers,field]<-mean(dataset[,field])
                       print(paste("REPLACED WITH MEAN: Outlier field=",names(dataset)[field],"#Records=",numberOfOutliers))
                       },
               "remove"={
                          dataset<-dataset[-indexToOutliers,]
                          print(paste("DELETED RECORDS: Outlier field=",names(dataset)[field],"#Records=",numberOfOutliers))
                         },
              "ignore"=  {
                         print(paste("NO REPLACEMENT: Outlier field=",names(dataset)[field],"#Records=",numberOfOutliers))
                         }
               )
      } #endof if any outliers found
    } #endof if ordinal
  } #endof for() each field

  return(dataset)
}

# ************************************************
# NPREPROCESSING_categorical() :
# Transform SYMBOLIC or DISCRETE fields using 1-hot-encoding
# INPUT: data frame    - dataset      - symbolic fields
# OUTPUT : data frame    - transformed dataset
# ************************************************
NPREPROCESSING_categorical<-function(dataset) {
    catagorical <- data.frame()
    
    for (column_name in names(dataset)) {
        print(column_name)
        # Convert into factors. A level for each unique string
        ffield<-factor(dataset[,column_name])

        # Check if too many unique values to encode
        if (nlevels(ffield) > MAX_LITERALS) {
          stop(paste("too many literals in:",
                     column_name,
                     nlevels(ffield)))
        }

        # Check if just one value!
        if (nlevels(ffield) ==1) {
          stop(paste("field stuck at a single value:",
                     column_name))
        }

        # 1-hot encoding. A new column for each unique "level"
        xx<-data.frame(model.matrix(~ffield+0, data=ffield))

        names(xx)<-gsub("ffield",column_name,names(xx))

        # If 2 unique values, then can encode as a single "binary" column
        if (ncol(xx)==2){
          xx<-xx[,-2,drop=FALSE]
          names(xx)<-column_name  # Field name without the value appended
        }
        
        catagorical<-as.data.frame(append(catagorical,xx))
    }
  return (catagorical)
}

# ************************************************
# Nrescale() :
# These are the real values, that we scale between 0-1
# i.e. x-min / (max-min)
# INPUT:   vector - input - values to scale
# OUTPUT : vector - scaled values to [0.0,1.0]
# ************************************************
Nrescale<-function(input){
  minv<-min(input)
  maxv<-max(input)
  return((input-minv)/(maxv-minv))
}

# ************************************************
# InitialFieldTypes() :
# Sets the initial field types for each field in the dataset
# Possible Field Types: 
# SYMBOLIC, NUMERIC ORDINAL, NUMERIC DISCRETE
# INPUT: DataFrame - dataset - dataset to categorise into field types
# OUTPUT: Vector - field_type_list - list of field types corresponding to the dataset colnames
# ************************************************
InitialFieldTypes<-function(dataset){
  #Vector to store all associated field types
  field_types <- vector()

  # Loop through dataset and check for numeric fields
  for(field in 1:(ncol(dataset))){
    if (is.numeric(dataset[,field])) {
      # If numeric, assign NUMERIC to the same index in field_types
      field_types[field]<-"NUMERIC"
    }
    else {
      # Otherwise assign the field as symbolic
      field_types[field]<-"SYMBOLIC"
    }
  }

  # Storing all column names into two lists for visualisation purposes
  num_fields <- c()
  sym_fields <- c()

  # Loop through field types and append the associated field names to the new lists
  for(i in 1:(length(field_types))){
    if(field_types[i] == "SYMBOLIC"){
      sym_fields <- append(sym_fields, colnames(dataset)[i])
    } else if(field_types[i] == "NUMERIC"){
      num_fields <- append(num_fields, colnames(dataset)[i])
    }
  }

  # Print the lists storing the numeric and symbolic field names
  print(paste("Numeric Fields: ", length(num_fields)))
  print(num_fields)
  print(paste("Symbolic Fields: ", length(sym_fields)))
  print(sym_fields)
  return(field_types)
}

# ************************************************
# datasetRead() :
# Importing a CSV file and cleaning the inputs if required
# INPUT: 
#         string  -    csvFile    - Name of the CSV File
#         boolean - cleanColumns  - Flag indicating whether to clean the column names   
# 
# OUTPUT : data frame - CSV files as a dataframe
# ************************************************
datasetRead<-function(csvFile, cleanColumns = FALSE){
    dataset<-read.csv(csvFile, encoding="UTF-8", stringsAsFactors = FALSE)
    
    # Cleaning the dataset names if required
    if(cleanColumns){
        names(dataset)<-NPREPROCESSING_removePunctuation(names(dataset))
    }
        
    print(paste("Read", csvFile, ". Rows = ", nrow(dataset), "Features:"))
    print(names(dataset))
    
    return(dataset)
}

# encodeOrderedSymbols()
#
# Encodes symbols in a field to 1/n
# See Lecture 3, slide 48, Ordered Catagorical encoding
#
# INPUT:    Data Frame     - originalDataset - dataset to preprocess
#           String         - fieldName       - name of the field
#           String Vector  - orderedSymbols  - list of symbols in order to be encoded
#
# OUTPUT :  Data Frame - updated dataset
# 111119NRT - minor bug with length() compare
# ************************************************
NPREPROCESSING_encodeOrderedSymbols<-function(dataset, fieldName, orderedSymbols){
  field<-which(names(dataset)==fieldName)

  for (eachSymbol in 1:length(orderedSymbols)){
    records<-which(dataset[,field]==orderedSymbols[eachSymbol])
    if (length(records)>0){
      dataset[records,field]<-(eachSymbol-1)/(length(orderedSymbols)-1)
    }
  }
  dataset[,field]<-as.numeric(dataset[,field])
  return(dataset)
}

# ***************************************************
# Various metrics : Calculate various confusion matrix metrics
# INPUT: TP - int - True Positive records
#        FP - int - False Positive records
#        TN - int - True Negative records
#        FN - int - False Negative records
# OUTPUT : float - calculated results
# ***************************************************

NcalcAccuracy<-function(TP,FP,TN,FN){return(100.0*((TP+TN)/(TP+FP+FN+TN)))}
NcalcPgood<-function(TP,FP,TN,FN){return(100.0*(TP/(TP+FP)))}
NcalcPbad<-function(TP,FP,TN,FN){return(100.0*(TN/(FN+TN)))}
NcalcFPR<-function(TP,FP,TN,FN){return(100.0*(FP/(FP+TN)))}
NcalcTPR<-function(TP,FP,TN,FN){return(100.0*(TP/(TP+FN)))}
NcalcMCC<-function(TP,FP,TN,FN){return( ((TP*TN)-(FP*FN))/sqrt((TP+FP)*(TP+FN)*(TN+FP)*(TN+FN)))}

# ***************************************************
# NcalcConfusion() :
# Calculate a confusion matrix for 2-class classifier
# INPUT: vector - confusion - output from table()
# OUTPUT: A list with the following entries:
#        TP - int - True Positive records
#        FP - int - False Positive records
#        TN - int - True Negative records
#        FN - int - False Negative records
#        accuracy - float - accuracy metric
#        pgood - float - precision for "good" (values are 1) metric
#        pbad - float - precision for "bad" (values are 1) metric
#        FPR - float - FPR metric
#        TPR - float - FPR metric
# ***************************************************
NcalcConfusion<-function(confusion){

  TP<-confusion[2,2]
  FN<-confusion[1,2]
  FP<-confusion[2,1]
  TN<-confusion[1,1]

  retList<-list(  "TP"=TP,
                  "FN"=FN,
                  "TN"=TN,
                  "FP"=FP,
                  "accuracy"=NcalcAccuracy(TP,FP,TN,FN),
                  "pgood"=NcalcPgood(TP,FP,TN,FN),
                  "pbad"=NcalcPbad(TP,FP,TN,FN),
                  "FPR"=NcalcFPR(TP,FP,TN,FN),
                  "TPR"=NcalcTPR(TP,FP,TN,FN),
                  "mcc"=NcalcMCC(TP,FP,TN,FN)
  )
  return(retList)
}



# ************************************************
# Npredict()
# Predict class using trained Logistic classifier - single predictor
# INPUT:        data frame - dataset        - Input values
#               String     - predictorName  - predictor field
# OUTPUT :      vector    - predicted class {0,1}
# ************************************************                                 
Npredict <- function(dataset, outputName, predictorName, logisticModel){
    
    y <- Nrescale(dataset[,outputName])
    actualClass <- y>0.5
    
    print(logisticModel)
      
    predictorProbs <- as.vector(predict(logisticModel, data.frame(x=dataset[, predictorName]), type="response"))
    predictedClass <- predictorProbs>0.5
    
    confusion <- table(predictedClass, actualClass)
    
    return(confusion)
    
}


# ************************************************
# NscatterPlotLogisticRegression()
# Logistic classifier - single predictor
# INPUT:        data frame - datasetTrain   - Training dataset
#               String     - outputName     -  name of the field to predict
#               String     - predictorName  - predictor field
# OUTPUT :      object     - trained linear model object
# ************************************************
  
NscatterPlotLogisticRegression<-function(datasetTrain,
                                         outputName,
                                         predictorName,
                                         threshold){

  v<-datasetTrain[,outputName]
  minv<-min(v)
  maxv<-max(v)
  y<-(v-minv)/(maxv-minv)

  scaleThreshold<-(threshold-minv)/(maxv-minv)
  x<-datasetTrain[,predictorName]
  topredict<-data.frame(x)


  #These show the classification of either HIGH or LOW house prices
  NplotDecisions(paste("p(",outputName,")",sep=""), y, topredict, 0.5, "Logistic Classifier")
  abline(h=scaleThreshold,col="blue",lty=2)

  #Build a logistic regression classifier
  dframe<-data.frame(x,y)
  formular<-paste("y~x")
  logisticModel<-glm(formular,data=dframe,family=quasibinomial)

  #creates prediction for an entire x range
  topredict<-data.frame(seq(min(x),max(x),.01))
  names(topredict)<-"x"

  #Now generate predictions on  range and plot to visulise the fitted model
  y_predicted<-predict(logisticModel, topredict,type="response")
  scatter<-data.frame(topredict,y_predicted)
  lines(scatter[,"x",],scatter[,"y_predicted"],pch=4,col="blue",lwd=4 )
  lines(scatter[,"x",],scatter[,"y_predicted"]>scaleThreshold,pch=4,col="black",lty=2,lwd=2)

  return(logisticModel)
}


# ***************************************************
# NcalcConfusion() :
# Calculate a confusion matrix for 2-class classifier
# INPUT: vector - confusion - output from table()
# OUTPUT: A list with the following entries:
#        TP - int - True Positive records
#        FP - int - False Positive records
#        TN - int - True Negative records
#        FN - int - False Negative records
#        accuracy - float - accuracy metric
#        pgood - float - precision for "good" (values are 1) metric
#        pbad - float - precision for "bad" (values are 1) metric
#        FPR - float - FPR metric
#        TPR - float - FPR metric
# ***************************************************
NcalcConfusion<-function(confusion){

  TP<-confusion[2,2]
  FN<-confusion[1,2]
  FP<-confusion[2,1]
  TN<-confusion[1,1]

  retList<-list(  "TP"=TP,
                  "FN"=FN,
                  "TN"=TN,
                  "FP"=FP,
                  "accuracy"=NcalcAccuracy(TP,FP,TN,FN),
                  "pgood"=NcalcPgood(TP,FP,TN,FN),
                  "pbad"=NcalcPbad(TP,FP,TN,FN),
                  "FPR"=NcalcFPR(TP,FP,TN,FN),
                  "TPR"=NcalcTPR(TP,FP,TN,FN),
                  "mcc"=NcalcMCC(TP,FP,TN,FN)
  )
  return(retList)
}


# ************************************************
# NplotDecisions()
# Visulise the decisions made by the linear model
# INPUT:
#               String - outputName   - name of the field to predict
#               Vector - y_predicted  - values of the output field
#               Frame  -  topredict   - values of the predictor field
#               Double - threshold    - value of the threshold over which is "YES"
#               String - title        - title of the graph
# OUTPUT :      None
# ************************************************
NplotDecisions<-function(outputName,
                         y_predicted,
                         topredict,
                         threshold,
                         title){

  predictorName1<-names(topredict)
  y_decisions<-ifelse(y_predicted>threshold,1.0,0.0)

  #Create a frame with all values, then two frames with the CLASS 0/CLASS 1
  scatter<-data.frame(topredict,y_decisions)
  class1<-scatter[which(scatter$y_decisions==1),]
  class0<-scatter[which(scatter$y_decisions==0),]

  plot(class1,pch=4,ylab=outputName,xlab=predictorName1,main=paste(title,outputName),col="green",ylim=c(0, 1),sub="2 Classes. Threshold shown.",xlim=c(min(topredict),max(topredict)))
  points(class0,pch=6,ylab=outputName,xlab=predictorName1,main=paste(title,outputName),col="red",ylim=c(0, 1))

}


# ************************************************
# NscatterPlotLinearDecisions()
# Using simple linear classifier
# Plot a "decision" boundary based on threshold
# INPUT:        data frame - datasetTrain   - Training dataset
#               data frame - datasetTest    - Test dataset
#               String     - outputName     -  name of the field to predict
#               String     - predictorNam   - predictor field
#               double     - threshold      - cutoff value [0,1]
#
# OUTPUT :      None
# ************************************************
NscatterPlotLinearDecisions<-function(dataset,
                                      outputName,
                                      predictorName,
                                      threshold){

  #Creates a frame with a single column of the predictor input field
  topredict<-data.frame(dataset[,predictorName])
  names(topredict)<-predictorName

  #These are the real values, that we scale between 0-1
  # x-min / max-min
  v<-dataset[,outputName]
  minv<-min(v)
  maxv<-max(v)

  known_values<-(v-minv)/(maxv-minv)

  scaleThreshold<-(threshold-minv)/(maxv-minv)

  #Actual classes, split by the threshold
  NplotDecisions(outputName, known_values, topredict, scaleThreshold,"Linear Classifier")

  #Show the threshold, over this dotted line should classify into class 1
  abline(h=scaleThreshold,col="blue",lty=2)

  #Create small data frame with just the y and x values
  dframe<-data.frame(known_values,topredict)
  names(dframe)[1]=outputName

  #Build the linear model
  formular<-paste(outputName,"~",predictorName)
  linearModel<-lm(formular,data=dframe)

  #Show model line on graph - we need to rescale to the decision scale
  topredict<-data.frame(seq(min(dataset[,predictorName]),max(dataset[,predictorName]),by=.1))
  names(topredict)<-predictorName
  y_predicted<-predict(linearModel, topredict)

  #y_predicted_01<-rescale(y_predicted,range(0,1))

  #This shows the line that the model will use to seperate the classes
  lines(topredict[,predictorName],y_predicted,col="blue",lwd=4)
  lines(topredict[,predictorName],y_predicted>scaleThreshold,pch=4,col="black",lty=2,lwd=2)
}

# ************************************************
# N_createTimeSeriesDataSet()
# Detrend and Scale the stock prices
# Split into train as first period and test as following period datasets
#
# INPUT:    Data Frame - openStockPrice - stock prices, rownames are dates
#
# OUTPUT :  data frame - train dataset
#           data frame - test dataset
#           double - min value in realworld dataset
#           double - max value in realworld dataset
#
# ************************************************
N_createTimeSeriesDataSet<-function(openStockPrice){

  # Detrend the timeseries by each TIME_SLOT

  openStockPrice$means<-0
  openStockPrice<-Ndetrend(openStockPrice)

  #scale. Save the min/max AFTER the detrend and scale for the NN
  realmin<-min(openStockPrice[,1])
  realmax<-max(openStockPrice[,1])
  openStockPrice[,1]<-N_scale0_to_1(openStockPrice[,1])

  #Plot the detrend and scaled dataset
  plot(as.timeSeries(openStockPrice[,1,drop=FALSE]),
       at="chic",
       plot.type="s",
       cex.axis=0.75,
       type="l",
       cex.pch=0.5)

  title(paste("Detrend the timeseries over",TIME_SLOTS,"days"))

  # Use the entire dataset to create a sliding window of TIME_SLOT columns
  # The column names default to V1, V2...Vn
  # $means are the detrend means so can convert back to real-world values
  # The rownames are the date of the stock value in field "V10"

  res<-N_SlideWindow(timeSeriesData=openStockPrice,window=TIME_SLOTS)

  # Splits the dataset for 70% earlier period, 30% later period
  r1<-Nsplit(res)

  #Adds the stock min/max AFTER the detrend to the return list
  r1$min<-realmin
  r1$max<-realmax

  return(r1)
}

# ************************************************
# Ndetrend()
# Detrend each timeslot in the dataset
#
# INPUT:    Data Frame - stock prices, rownames are dates
#
# OUTPUT :  Data Frame - detrened stock prices
#
# ************************************************
Ndetrend<-function(openStockPrice){

  # ************************************************
  # NdetrendEntry()
  # SCOPE: Ndetrend()
  #
  # Detrend individual timeslot by dividing by its mean
  #
  # INPUT:    Data Frame - openStockPriceEntry - stock prices
  #
  # OUTPUT :  Data Frame - detrended and with $means added
  #
  # ************************************************
  NdetrendEntry<-function(openStockPriceEntry){

    openStockPriceEntry$means<-mean(openStockPriceEntry[,1])
    openStockPriceEntry[,1]<-openStockPriceEntry[,1]/openStockPriceEntry$means

    return(openStockPriceEntry)
  } #endof NdetrendEntry()

  # ************************************************
  # Start Ndetrend()

  for (eachSlot in 1:as.integer(nrow(openStockPrice)/TIME_SLOTS)){
    start<-((eachSlot-1)*TIME_SLOTS)+1
    end<-start+TIME_SLOTS-1
    openStockPrice[start:end,]<-NdetrendEntry(openStockPrice[start:end,])
  }

  # This does the last few entries as the dataset may not be multiple
  # of the TIME_SLOTS
  end<-nrow(openStockPrice)
  if ((end %% TIME_SLOTS)!=0){
    start<-(eachSlot*TIME_SLOTS)+1
    openStockPrice[start:end,]<-NdetrendEntry(openStockPrice[start:end,])
  }
  return(openStockPrice)
} # Ndetrend()

# ************************************************
# N_scale0_to_1()
# Scale values [0.0,1.0]
#
# INPUT:    vector double - value to scale
# OUTPUT :  vector double - scaled values [0.0,1.0]
#
# ************************************************
N_scale0_to_1 <- function(x){(x-min(x))/(max(x)-min(x))}

# ************************************************
# N_unscale0_to_1()
# Take values [0.0,1.0] and convert back to real values
#
#
# INPUT:    vector double - value to unscale
#           double - min real value
#           double - max real value
# OUTPUT :  vector double - unscaled values [min,max]
#
# ************************************************
N_unscale0_to_1 <- function(x,minv,maxv){
  return(((maxv-minv)*x)+minv)
  }

# ************************************************
# N_SlideWindow()
#
# Create a dataset with "window" columns that are
# shifted one place (i.e. one time period=day) to the left
#
# INPUT:     dataframe - timeSeriesData - row names are dates
#            int       - window         - size of time window
#
# OUTPUT :   dataframe - row names are dates
#                      - fields name "V1","V2"..."V"[window size]
#                      - $means mean of each time window
#
# 051119NRT Updated to fix issue with NA in data frame
#           $means now a column in the dataframe
#  #100320NRT fixed tp single mean value for row
# ************************************************
N_SlideWindow<-function(timeSeriesData, window){

  nRows<-nrow(timeSeriesData)+1-window

  if (nRows<=0)
    stop("Prof Nick Says: Too few date rows to create a sliding window")

  prices<-data.frame(rep(data.frame(rep(NA,nRows)),window),means=NA)
  names(prices)[1:window]<-paste("V",1:10,sep="")

  for (r in 1:nRows){
    prices[r,1:window]<-timeSeriesData[(r):(r+window-1),1]
    prices$means[r]<-timeSeriesData$means[r] #100320NRT single mean value for row
  }

  # Save the date of stock price for V10 (the value we are predicting)
  rownames(prices)<-rownames(timeSeriesData)[window:(nrow(timeSeriesData))]

  return(prices)
}

# ************************************************
# Nsplit()
# Split data set as:
# train/test values, train/test mean values
#
# INPUT: Frame - dataset
#
# OUTPUT : Frame - test dataset
#          Frame - train dataset
#          String - Date of test test dataset start
#
# 051119NRT Simplified as $mean is now field in dataset
# ************************************************
Nsplit<-function(datasetWithMenas){

  training_records<-round(nrow(datasetWithMenas)*(TRAINING_SPLIT))

  train <- 1:training_records
  test <- -train

  training_data <- datasetWithMenas[train,]
  testing_data = datasetWithMenas[test,]

  splitDate<-row.names(testing_data)[1]

  info<-data.frame(Dataset="Train Period",
                   start=row.names(training_data[1,]),
                   end=row.names(training_data[training_records,]),
                   records=training_records,
                   stringsAsFactors = FALSE)

  info<-rbind(info,data.frame(Dataset="Test Period",
                              start=splitDate,
                              end=row.names(testing_data[nrow(testing_data),]),
                              records=nrow(testing_data),
                              stringsAsFactors = FALSE))

  print(formattable::formattable(info))

  retList<-list(train=training_data,
                test=testing_data,
                splitDate=splitDate
                )
  return(retList)
}

# ************************************************
# N_DEEP_Initialise()
# Initialise the H2O server
#
# INPUT:
#         Bool       - reproducible       - TRUE if model must be reproducable each run
#
# OUTPUT : none
# ************************************************
N_DEEP_Initialise<-function(reproducible=TRUE){

  library(h2o)

  print("Initialise the H2O server")

  #Initialise the external h20 deep learning local server if needed
  #130517NRT - set nthreads to -1 to use maximum so fast, but set to 1 to get reproducable results
  #080819NRT - use reproducible parameter
  #111120NRT - remove "max_mem_size=" that prevents H2O from using more than that amount of memory

  if (reproducible==TRUE)
    nthreads<-1
  else
    nthreads<- -1

  h2o.init(nthreads = nthreads)

  h2o.removeAll() # 261019NRT clean slate - just in case the cluster was already running

  h2o.no_progress()
}

# ************************************************
# N_DEEP_Train()
#
# h2O NEURAL NETWORK : DEEP LEARNING CLASSIFIER TRAIN
#
# INPUT:  Frame      - train              - scaled [0.0,1.0], fields & rows
#         String     - fieldNameOutput    - Name of the field to classify
#         Int Vector - hidden             - Number of hidden layer neurons for each layer
#         int        - stopping_rounds    - Number of times no improvement before stop
#         double     - stopping_tolerance - Error threshold
#         String     - activation         - Name of activation function
#         Bool       - reproducible       - TRUE if model must be reproducable each run
#         Bool       - regression         - TRUE to predict values rather than classification
#
# OUTPUT: object     - trained neural network
# ************************************************
N_DEEP_Train<- function(train,
                        fieldNameOutput,
                        hidden,
                        stopping_rounds,
                        stopping_tolerance,
                        activation,
                        reproducible=TRUE,
                        regression=FALSE){

  #positionOutput<-which(names(test)==fieldNameOutput)

  #Creates the h2o training dataset
  if (regression==FALSE) {
    train[fieldNameOutput] <- lapply(train[fieldNameOutput] , factor) #Output class has to be a R "factor"
  }

  train_h2o <- as.h2o(train, destination_frame = "traindata")

  # Create validation dataset for early stopping
  splits <- h2o.splitFrame(train_h2o, 0.9, seed=1234)
  nntrain  <- h2o.assign(splits[[1]], "nntrain.hex") # 90%
  nnvalid  <- h2o.assign(splits[[2]], "nnvalid.hex") # 10%

  #This lists all the input field names ignoring the fieldNameOutput
  predictors <- setdiff(names(train_h2o), fieldNameOutput)

  # Deep training neural network
  # Updated 13/5/17 - set reproducible = TRUE so that the same random numbers are used to initalise
  # 281019NRT - added validation dataset for early stopping

  deep<-h2o::h2o.deeplearning(x=predictors,
                              y=fieldNameOutput,
                              training_frame = nntrain,
                              validation_frame=nnvalid,
                              epochs=BASICNN_EPOCHS,
                              hidden=hidden,
                              adaptive_rate=TRUE,
                              stopping_rounds=stopping_rounds,
                              stopping_tolerance=stopping_tolerance,
                              stopping_metric = "AUTO",
                              fast_mode=FALSE,
                              activation=activation,
                              seed=1234,
                              l1 = 1e-2,
                              l2 = 1e-2,
                              reproducible = TRUE)

  return(deep)
}

# ************************************************
# N_EVALUATE_DeepNeural() :
#
# Evaluate Deep Neural Network classifier
# Generates probabilities from the classifier
#
# INPUT: Data Frame    -  test             - scaled [0.0,1.0], fields & rows
#        String        -  fieldNameOutput  - field to predict
#        Object        - deep              - trained NN
#
# OUTPUT :
#         double vector - predicted values
# ************************************************
# Uses   library(h2o)
N_EVALUATE_DeepNeural<-function(test,
                                fieldNameOutput,
                                deep,regression=FALSE) {

  #Creates the h2o test dataset
  if (regression==FALSE)
    # Output class has to be a R "factor" for classification
    test[fieldNameOutput] <- lapply(test[fieldNameOutput] , factor)

  test_h2o <- as.h2o(test, destination_frame = "testdata")

  pred <- as.vector(h2o::h2o.predict(deep, test_h2o))

  return(pred)
}

# ************************************************
# N_visualiseTimeSeriesResults()
# Plot actual and predicted timeseries in two panels
#
#
# INPUT:    double vector - actual     - actual values
#           double vector - predicted    - predicted values
#           double vector - means        - detrend means or 1
#           string vector - dates        - dates of timeseries
#           double        - realmin      - scale minimum value
#           double        - realmax      - scale  maximum value
#           string        - title        - title on graph
#           strings       - yaxis_title - (first plot, second plot)
#           Bool          - measuresFLag -TRUE to show RMSE and R2
#
# OUTPUT :  data frame - rows are dates
#                        [actual, predicted]
#
# ************************************************
N_visualiseTimeSeriesResults<-function(actual,
                                       predicted,
                                       means,
                                       dates,
                                       realmin,
                                       realmax,
                                       title,
                                       yaxis_title,
                                       measuresFLag){

  #Scale this back into the real values and multiply back detrend offset
  actual<-N_unscale0_to_1(actual,realmin,realmax)*means
  predicted<-N_unscale0_to_1(predicted,realmin,realmax)*means

  #Create a dataframe with the actual values and then the predictions with dates
  exp_pred<-data.frame(actual=actual,predicted=predicted)
  colnames(exp_pred)<-c("actual","predicted")
  row.names(exp_pred)<-dates

  #Uses the timeSeries library
  #Plot nice timeseries stock price chart
  #Show actual and predicted in seperate panels
  plot(as.timeSeries(exp_pred), at="chic", plot.type="m", cex.axis=0.75, type=c("l", "l"),ylab=yaxis_title)
  title(main = title)

  #Show test dataset with actual as black line and predicted overlaid as red points
  type<-ifelse(measuresFLag==TRUE,c("l", "p"),c("l", "l"))
  plot(as.timeSeries(exp_pred), at="chic", plot.type="s",
       cex.axis=0.75, type=type,cex.pch=0.5)
  legend("bottomleft", yaxis_title, col=1:ncol(exp_pred), lty=1, cex=.8)

  if (measuresFLag==TRUE){

    #Calculate measures
    RMSE<-Nrmse(exp_pred$actual,exp_pred$predicted)
    r2<-Nr2_timeSeries(exp_pred$actual,exp_pred$predicted)
    MAE<-Nmae(exp_pred$actual,exp_pred$predicted)

    title(main = paste(title,"- RMSE",round(RMSE,digits=2),
                       "MAE",round(MAE,digits=2),
                       "R2",round(r2,digits=4)))
  } else {
    title(main = title)
  }

  return(exp_pred)
}

# ************************************************
# Nrmse() : Calculate the RMSE statistic
#
# INPUT: actual_y vector of real numbers indicating the known class
#        y_predicted vector of real numbers indicating the predicted class
#
# OUTPUT : double RMSE
# ************************************************
Nrmse<-function(actual_y,y_predicted){

  return(sqrt(mean((actual_y-y_predicted)^2)))
}

# ************************************************
# Nmae: Calculate the MAE statistic
#
# INPUT: actual_y vector of real numbers indicating the known class
#        y_predicted vector of real numbers indicating the predicted class
#
# OUTPUT : double - MAE
# ************************************************
Nmae<-function(actual_y,y_predicted){

  return((mean(abs(actual_y-y_predicted))))
}

Functions developed by team¶

In [ ]:
# ************************************************
# DATA CLEANING AND PRE PROCESSING
# ************************************************

# ************************************************
# scrapeWeb() :
# Scraping the data for the games and saving it in a csv file
# INPUT: 
#         dataframe  -    games     - Table of games
#         string     - csvFileName  - Name of the CSV File  
# 
# OUTPUT : /
# ************************************************
scrapeWeb<-function(game_web, cssElement){
    
    el <- game_web %>%
                html_nodes(xpath = cssElement) %>%
                html_text() 
    return(el)
}

# ************************************************
# scrapeGames() :
# Scraping the data for the games and saving it in a csv file
# INPUT: 
#         dataframe  -    games     - Table of games
#         string     - csvFileName  - Name of the CSV File  
# 
# OUTPUT : /
# ************************************************
scrapeGames<-function(games, csvFileName){
     #Initial values
    scraped_game_data <- data.frame()
    counter<-0
    total_count<-0
    
    for (row in 1:100){ #nrow(games)
        start_time_per_game <- Sys.time()
        
        counter<-counter + 1
        # Getting the name of the current game
        name <- games[row, ]$Name
        name_cp <- name
        # Transforming all the spaces in the name to dashes; to make it a link 
        name <- chartr(" ", "-", name)
        
        # Removing all the other characters, other than the dash; such as periods or commas
        # Also changing the upper to lower cases
        name <- gsub("[^-a-zA-Z0-9[:space:]]+", "", tolower(name), perl = TRUE)
        
        platform <- games[row, ]$Platform
        platform_cp <- platform
        platform <- PLATFORMS[platform]
        
        # If URL is valid, then
        if(!is.na(platform)){
            # Combining the platform and the name, url looks like this -> /{platform}/{game_name}
            platform_name<- paste(platform, name, sep="/")
            
            # Fetching the URL and if the call fails it will return NA else it will return the HTML
            game_web<-tryCatch(
              read_html(paste(METACRITIC_URL, platform_name, sep="")), 
              error = function(e){NA}
            )
            
            # Scraping the values from the web page
            if(!is.na(game_web)){
                temp_vector <- c()
                
                #Scraping defined xpaths
                for(element in XPATH_DICT){
                    scraped_value = scrapeWeb(game_web, element)
                    
                    if(!is.na(scraped_value[1])){
                        temp_vector <- c(temp_vector, scraped_value[1])

                    }

                }
                # Extracting the year from the string
                year_only <- strsplit(temp_vector[1], ", ")[[1]]
                
                # Saving the values into the dataframe
                tmp_game <- data.frame(name_cp, platform_cp, temp_vector[1], year_only[2], temp_vector[2], temp_vector[3])

                scraped_game_data <- rbind(scraped_game_data, tmp_game)
            }
        }
    
    # Saving values to CSV every 10 values
    limit = 10
    if (identical(counter,limit)){
        rw_names = FALSE
        
        #Adding table names on the first save
        if(total_count == 0){
            rw_names = TRUE
            names(scraped_game_data) <- c('Name', 'Platform', 'Release Date', 'Release Year', 'Critic Reviews', 'User Review')
        }
        
        total_count<- total_count + counter
        write.table(scraped_game_data, file = csv_path, sep = ",",
                append = TRUE, quote = TRUE,
                col.names = rw_names, row.names = FALSE) 
        counter<-0
        scraped_game_data <- data.frame()
    }
    }
}

# ************************************************
# unifyNAValues() :
# Replaced values equivalent to NA with NA value 
# eg. "N/A" , "tbd" - to be determined, "RP" - rating pending
# INPUT: dataframe - dataset - dataframe to unify NA's on
# OUTPUT : dataframe - dataset - dataframe with unified NA's
# ************************************************
unifyNAValues<-function(dataset){
  dataset[dataset == 'N/A'] <- NA
  dataset[dataset == 'tbd'] <- NA
  dataset[dataset == ''] <- NA
  dataset[dataset == 'RP'] <- NA
  return (dataset)
}
  
# ************************************************
# NAValuesSummary() :
# Prints a summary and returns a subset of all rows in dataframe that contain NA values
# INPUT: dataframe - dataset - dataframe to get NA summary for
# OUTPUT : dataframe - NA_dataframe - of all rows that contain NA values
# ************************************************
NAValuesSummary<-function(dataset){
  NA_dataframe <- dataset[rowSums(is.na(dataset)) > 0,]
  print(paste('Total number of rows with NA values:', nrow(NA_dataframe)))
  print('Summary of NA values:')
  print(colSums(is.na((NA_dataframe))))
  return (NA_dataframe)
}

# ************************************************
# group_regions():
# Searching through different region types (country, continent, sub_continent) and grouping them with the years
# The only requirement is that all the regions need to be excluded from one another 
# (as then they are removed from the dataset after being found)
# 
# INPUT:  
#        Dataframe - demo  - dataset of age and gender demographics
#        boolean   - other - adding an other field to the dataset
# 
# OUTPUT : summarized_demographics - data grouped by region and year, where the age and gender are summarized as median
# ************************************************
group_regions <- function(demo, other=TRUE){
  first<-TRUE

  # Iterating through the regions
  for(region in REGIONS){
      print(region)
      
      # Getting the column name in which the value is located (either country, continent or sub-region)
      col_name <- names(which(colSums(demo == region, na.rm = TRUE) > 0))
      year<-"Year"

      # Grouping the values which belong to the region by the year and the region
      group <- group_by_at(demo[demo[col_name] == region, ], vars(year,col_name))
      
      # Removing the region from demographics -> in order to get all the other values
      demo<-demo[demo[col_name] != region, ]
      
      # Summarizing the data based on the region and the year, and getting the median of the age and gender demographics
      summary<-summarize(group, median(age, na.rm = TRUE), median(Populationfemaleoftotalpopulation, na.rm = TRUE))
      
      # Altering the names of the table
      names(summary)<-JOINED_NAMES
      
      # The first table we set to the summarized_demographics, and the rest we bind to the table based on the year
      if(first) {
          summarized_demographics<-summary
          first<-FALSE
      } else {
          summarized_demographics<-cbind(data.frame(summarized_demographics), summary[-which(names(summary) == "year")])
      }
  }

  if(other){
    ## Creating a data frame for all the other places
    print("Other")
    # Summarize
    summary<-summarize(group_by(demo, Year), median(age, , na.rm = TRUE), median(Populationfemaleoftotalpopulation, , na.rm = TRUE))
    # Create a region column and set it to"Other"
    summary$region <- "Other"
    # Reorder
    summary<-summary %>% select(Year, region, everything())
    # Rename
    names(summary)<-JOINED_NAMES

    # Adding the "Other" columns to the other summaries
    summarized_demographics<-cbind(data.frame(summarized_demographics), summary[-which(names(summary) == "year")])
  }


  # Iterating through the column names to change the column to names, to contain relevant region data
  for (i in seq(2, length(summarized_demographics), by=3)) {
      colnames(summarized_demographics)[i] = "region"
      region<-NPREPROCESSING_removePunctuation(unique(summarized_demographics[[i]]))

      colnames(summarized_demographics)[i+1] = paste(region, "ageMedian", sep="_")
      colnames(summarized_demographics)[i+2] = paste(region, "femaleRatioMedian", sep="_")
  }
                  
  summarized_demographics<-summarized_demographics[which(names(summarized_demographics) != "region")] 

  return(summarized_demographics)
}

# ************************************************
# changeManual_fieldType() :
# Manually changes any field type of a field to the desired one based on a dictionary input
# Possible Field Types: 
# SYMBOLIC, NUMERIC ORDINAL, NUMERIC DISCRETE
# INPUT: Vector - field_type_list - list of field types corresponding to the dataset colnames
#        Ditctionary - manual_changes - Dictionary of field 
#                      names and corresponding field types they need to be changed to
#        DataFrame - dataset - dataset associated to the field types.
# OUTPUT: Vector - field_type_list - list of field types corresponding to the dataset colnames
# ************************************************
changeManual_fieldType<-function(dataset, field_types_list, manual_changes){
  # Loop thorugh field_types and assign the correct types from the manual_changes dict
  for(i in 1:length(dataset)){
    field_name <- colnames(dataset)[i]
    if(field_name %in% names(manual_changes)){
      field_types_list[i] <- manual_changes[field_name]
    }
  }
  return(field_types_list)
}

# ************************************************
# concatArrayToString() :
# creates a string interpretation of an array, with a comma to separate values
# INPUT: array of values
# OUTPUT : single string containing all values from the array, in order
# ************************************************
concatArrayToString <- function(arr_to_join){
    arr_string <- ""
    for (item in arr_to_join){
        arr_string = paste(arr_string, item, sep = ", ")
    }
    return (arr_string)
}

# ************************************************
# concatGameName() :
# creates a string interpretation of an array, with a space to separate values
# INPUT: array of values
# OUTPUT : single string containing all values from the array, in order
# ************************************************
concatGameName <- function(arr_to_join){
    arr_string <- ""
    for (item in arr_to_join){
        arr_string = paste(arr_string, item)
    }
    return (arr_string)
}

# ************************************************
# stringToArray() :
# creates a string representation of an array back to an array
# INPUT: string representation of array (ouput of concatArrayToString())
# OUTPUT : vector containing all values encoded in the string
# ************************************************
stringToArray <- function(input_string){
    out_arr <- strsplit(input_string, ", ")
    return(out_arr)
}

# ************************************************
# filterUnwantedWords() :
# removes unwanted words from the given vector
# INPUT: game title as a vector of words
# OUTPUT : the game title as a vector with unwanted words removed
# ************************************************
filterUnwantedWords <- function(inut_name_array){
    # Words to filter out of game titles
    words_to_remove <- c(
        "of", "The", "no", "the", "&", "to", "-", "DS", "and", "in", "Edition", "Collection", "/",
        "for", "A", "My", "DS:", "a", "In", "on", "or", "at", "For"
    )
    name_vector <- c()
    for (word in inut_name_array){
        name_vector <- append(name_vector, word)
    }

    new_split_name <- name_vector[!name_vector %in% words_to_remove]

    return(new_split_name)
}

# ************************************************
# singleWordComparrison() :
# compares given game title to others to find relationships between titles. For 1 word titles
# INPUT:
#- word: first word of the game to compare with
#- game_name: full name of the game (as a vector, seperated on spaces)
#- related_game_array: vector to add the related games to
#- split_game_names: vector of all games to compare against (each name seperated on spaces)
#
# OUTPUT :
#- vector of all related games
# ************************************************
singleWordComparrison <- function(word, filtered_game_name, game_name, related_game_array, split_game_names){
    for (split_game in split_game_names){
        if (word == (split_game[1])){
            if (!identical(game_name, split_game)){
                related_game_array <- append(related_game_array, concatGameName(split_game))
            }
        }
    }
    return(related_game_array)
}

# ************************************************
# multiWordComparrison() :
# compares given game title to others to find relationships between titles. For titles longer than 1 word
# INPUT:
#- first_word: first word of the game to compare with
#- second_word: first word of the game to compare with, filtered so it is not numeric
#- game_name: full name of the game (as a vector, seperated on spaces)
#- related_game_array: vector to add the related games to
#- split_game_names: vector of all games to compare against (each name seperated on spaces)
#
# OUTPUT :
#- vector of all related games
# ************************************************
multiWordComparrison <- function(first_word, second_word, game_name, filtered_game_name, related_game_array, split_game_names){
    for (split_game in split_game_names){
        # check 1st word
        if (first_word == (split_game[1])){
            # check 2nd word
            # if 2nd word of split_game is a number than skip it (numbers are filtered out of second_word)

            if (grepl("[0-9]", split_game[2])){

                if (length(split_game) > 2){

                    # if split_game is not longer than 2 words and second word is a number, then compare 1st words
                    if (second_word == (split_game[3])){
                        if (!identical(game_name, split_game)){
                            related_game_array <- append(related_game_array, concatGameName(split_game))
                        }
                    }
                    else{
                        if (!identical(game_name, split_game)){
                            related_game_array <- append(related_game_array, concatGameName(split_game))
                        }
                    }
                }
            }
            else{
                if (length(split_game) > 2){
                    if (second_word == (split_game[2])){
                        if (!identical(game_name, split_game)){
                            related_game_array <- append(related_game_array, concatGameName(split_game))
                        }
                    }
                }
                else{
                    if (!identical(game_name, split_game)){
                        related_game_array <- append(related_game_array, concatGameName(split_game))
                    }
                }
            }
        }
    }
    return(related_game_array)
}

# ************************************************
# CREATE_FRANCHISES() :
# Adds column to dataset that says if a game is part of a franchise
# INPUT: dataframe containing game data
# OUTPUT : data frame including new column
# ************************************************
CREATE_FRANCHISES <- function(game_df){
    game_count <- 0
    # vector containing all game names from the dataset
    game_names <- game_df$Name

    #####################################
    #   Filter our repeated names
    #   caused by different consoles
    #####################################

    unique_names <- c()
    for (name in game_df$Name){
        if (name %in% game_names & !identical(name, "")){
            game_names <- game_names[game_names != name]
            unique_names <- append(unique_names, name)
            game_count <- game_count + 1
        }
    }

    # split each name into an array of words
    unique_names_split <- strsplit(unique_names, " ")

    # get a vector containing all unique words in the game titles
    unique_words <- c()

    words <- c()

    for (name in unique_names_split){
        for (word in name){
            if (! word %in% unique_words ){
                unique_words <- append(unique_words, word)
            }
        }
    }

    # get a vector containing every word (including repeated)
    for (name in unique_names_split){
        for (word in name){
            words <- append(words, word)
        }
    }

    count <- 0
    initial_franchises = c()

    for (split_name in unique_names_split){
        # count is just holding the number of games that are looked at
        count <- count + 1
        
        game_array <- c()

        new_split_name <- filterUnwantedWords(split_name)

        # If game name is 1 word long
        if (length(new_split_name) == 1){
            first_word <- new_split_name[1]

            game_array <- singleWordComparrison(first_word, split_name, new_split_name, game_array, unique_names_split)

            game_franchise_string <- concatArrayToString(c(concatGameName(split_name), game_array))
            initial_franchises <- append(initial_franchises, game_franchise_string)

        }
        else {
            first_word <- split_name[1]
            second_word <- split_name[2]

            # check 2nd word to see if it's just numbers
            # if it is, then disregard and just use 1st word
            if (grepl("[0-9]", second_word)){
                game_array <- singleWordComparrison(first_word, split_name, new_split_name, game_array, unique_names_split)

                game_franchise_string <- concatArrayToString(c(concatGameName(split_name), game_array))
                initial_franchises <- append(initial_franchises, game_franchise_string)
            }
            else{
                game_array <- multiWordComparrison(first_word, second_word, split_name, new_split_name, game_array, unique_names_split)

                game_franchise_string <- concatArrayToString(c(concatGameName(split_name), game_array))
                initial_franchises <- append(initial_franchises, game_franchise_string)
            }
        }
    }

    count <- 0

    franchise_games <- c()
    in_franchise <- c()

    for (franchise in stringToArray(initial_franchises)){
        if (length(franchise) > 5){
            count <- count + 1
            franchise_games <- append(franchise_games, sub(" ", "", franchise[2]))
        }
    }
    count <- 0
    game_names <- game_df$Name
    for (name in game_names){
        count <- count + 1
        if (name %in% franchise_games){
            in_franchise <- append(in_franchise, 1)
        }
        else{
            in_franchise <- append(in_franchise, 0)
        }
    }
    game_df$inFranchise <- in_franchise
    return(game_df)
}

# ************************************************
# alterDataframeNames()
# Update column names based on dictionary of old and new
# column names
#
# INPUT:      data frame -      df     - df with column names
#             dictionary - change_dict - old and new column names
#
# OUTPUT :    data frame - original dataframe with updated column names
# ************************************************
alterDataframeNames<-function(df, change_dict){
    for (old_name in names(change_dict)){
        new_name <- change_dict[old_name]

        loc <- grep(old_name, colnames(df))

        names(df)[loc] <- new_name
    }
    
    return(df)
} # endof alterDataframeNames

# ************************************************
# appendToDataframe()
# Append rows to dataframe
#
# INPUT:      data frame -   df  - dataframe
#             vector     -  data - data to be appended to the df
#
# OUTPUT :    data frame - dataframe with the newly added row
# ************************************************
appendToDataframe<-function(df, data){
    df[nrow(df)+1, ] <- data
    
    return(df)
} # endof appendToDataframe



# ************************************************
# hot_encode()
# If this is our function but it's altered lab code make sure to mention that
#
# INPUT:      df      -   df        - dataframe
#             vector  -  columns    - columns that have to be one-hot-encoded
#
# OUTPUT :    data frame - dataframe with the newly one-hot-encoded columns
# ************************************************
hot_encode <- function(df, columns) {
    catagoricalReadyforML<-NPREPROCESSING_categorical(df[,columns])
    
    df <- df %>% select(-one_of(columns))
    df_encoded<-cbind(df, catagoricalReadyforML)
    
    return(df_encoded)
}

# ************************************************
# minMaxSummary() :
#
# The min and max values of each numeric column
# This will be used for denormalization
#
# INPUT:   dataframe - dataset - dataframe of values
#
# OUTPUT : dataframe - min_max_df - dataframe of all min max values 
#          for numeric columncs
# ************************************************
minMaxSummary<-function(dataset){
    min_max <- list(
      min = ~min(.x, na.rm = TRUE), 
      max = ~max(.x, na.rm = TRUE)
    )
    
    min_max_df <- dataset %>% 
        summarise(across(where(is.numeric), min_max))
    return(min_max_df)
}

# ************************************************
# LINEAR REGRESSION
# ************************************************
  
# ************************************************
# rmse()
# Calculate RMSE of predicted values against actual values
#
# INPUT:      actual    -  list  - values from the dataset
#             predicted -  list  - predicted values by a model
#
# OUTPUT :    float - RMSE
# ************************************************
rmse<-function(actual,predicted){
    # Getting the squared difference between predicted and actual
    sqr_diff <- (actual-predicted)^2
    # Unlisting it if it is a list
    sqr_diff <- verifyType(sqr_diff)
    
    # Return the square-rooted mean of the squared difference - i.e. RMSE
    return(sqrt(mean(sqr_diff)))
} #endof rmse

# ************************************************
# mae()
# Calculate MAE of predicted values against actual values
#
# INPUT:      actual    -  list  - values from the dataset
#             predicted -  list  - predicted values by a model
#
# OUTPUT :    float - MAE
# ************************************************
mae<-function(actual,predicted){
    # Getting the difference between predicted and actual values
    diff <- (actual-predicted)
    # Unlisting it if it is a list
    diff <- verifyType(diff)
    
    # Return the mean of absolute difference - i.e. MAE
    return(mean(abs(diff)))
}

# ************************************************
# verifyType()
# Verify the type, if the type is a list unlist it
#
# INPUT:      list -   values  - list to unlist
#
# OUTPUT :    values - unlisted list
# ************************************************
verifyType <- function(values){
    
    # Check the type of the input
    if(typeof(values) == "list"){
        # Unlist if it is a list
        values <- unlist(values)
    }
    return(values)
}

# ************************************************
# linearRegressionPlotPredict()
# Train a linear model, plot the regression and calculate metrics
#
# INPUT:      dataframe -  dataset       - train dataset
#             dataframe -  datasetTest   - test dataset
#             string    -  predictorName - name of the independent variable 
#             string    -  ouptutName    - name of the dependent variable
#
# OUTPUT :    values - unlisted list
# ************************************************
linearRegressionPlotPredict <- function(dataset, datasetTest, predictorName, outputName){
    # Get the column number of the predictor
    predictor_loc <- match(predictorName, names(dataset))

    # Group the dataset by the output and then get the mean of the predictor
    df <- dataset %>% 
          group_by_(outputName) %>% 
          summarize_at(predictor_loc-1, mean)

    print(names(df))
    
    # Define the formula for predicting the output
    formula <- paste0(outputName,"~",predictorName)
    # Change the order of the column
    df <- df[, c(2,1)]
    # Train the linear model on the train set
    modelFit <- lm(formula, data = df)
    
    # Get the predictor input from the test set
    predictorInput<-data.frame(datasetTest[,predictorName])
    names(predictorInput)<-predictorName

    # Get the actual value that we are expecting the model to predict
    y_actual<-datasetTest[,outputName]
    y_predicted<-predict(modelFit, predictorInput)

    # Calculate the metrics based on the actual and predicted values
    RMSE<-round(rmse(y_actual,y_predicted),digits=2)
    mae<-round(mae(y_actual,y_predicted),digits=2)
    r2<-round(Nr2(modelFit),digits=2)

    # Plotting the scatter graph
    plot(df, main=paste("Linear Regression:", 
                        sub=paste("MAE=",mae,"RMSE=",RMSE," R2=",r2)))
    # Graphing the best fit line through the scatter plot based on the linear model
    abline(modelFit, col = "red")
} #endof linearRegressionPlotPredict

# ************************************************
# Nr2()
# Calculate the r2 metric (adjusted to allow for multiple inputs)
# REMEMBER this is a measure of the fit of the training data to the model
# it is NOT a measure of how good a predictor the model is on unseen data
# INPUT:      object - linearModel - trained linear model
# OUTPUT :    double -  R2 extracted from the model object
# ************************************************
Nr2<-function(linearModel){
  rsq<-summary(linearModel)$adj.r.squared
    
  return(rsq)
} # endof Nr2

# ************************************************
# Calculate the r2 measure
#
# INPUT:      vector - double values for actual values
#             vector - double values of predicted values
# OUTPUT :    double - calculated N2
# ************************************************
Nr2_timeSeries<-function(actual,preds){
 
  rsq<-cor(preds, actual) ^ 2
 
  return(rsq)
}



# ************************************************
# CLUSTERING
# ************************************************
  
# ************************************************
# splitDataBy() :
#
# Returns a dataframe of all rows that are of a certain genre and platform
#
# INPUT:  dataframe - dataset  - dataframe to split
#         String  - splitBy - column name to split data by 
# OUTPUT : dataframe - dataset - new dataframe with data belonging to that genre and platform
# ************************************************
splitDataBy<-function(dataset, splitBy){
    dataset <- dataset[which(dataset[, splitBy] == 1),]
  
  return(dataset)
}
  
# ************************************************
# denormalize()
# INPUT:  vector - input - vector of inputs to denormalize
#         double - min - minimum value
#         double - max - maximum value
# OUTPUT : double -  denormalized value
# ************************************************
denormalize<-function(input, min, max){
     input*(max-min) + min
}

# ************************************************
# denormalizeColumns()
# INPUT:      dataframe - dataset - dataframe containing normalized values
#             vector - columnList - vector of columnNames to denormalize
#             dataframe - minMax - dataframe of mins and maxs of each column before normalization
# OUTPUT :    dataframe - dataset - dataframe of denormalized values
# ************************************************
denormalizeColumns<-function(dataset, columnList, minMax) {
    for (colName in columnList) {
        minCol <- paste(colName, "_min", sep = "")
        maxCol <- paste(colName, "_max", sep = "")
        dataset[colName] <- mapply(denormalize, dataset[,colName], select(minMax,contains(minCol)), select(minMax,contains(maxCol)))
    }
    return(dataset)
}

# ************************************************
# determineClusterNum() :
#
# Returns the optimal number of clusters based on the silhouette index 
#
# INPUT:   predictors - input predictors dataframe for clustering 
#
# OUTPUT : numClusters - Optimal number of clusters
# ************************************************
# Uses   library(factoextra)
# https://cran.r-project.org/web/packages/factoextra/index.html
# ************************************************
determineClusterNum <- function(predictors){
   p<-factoextra::fviz_nbclust(predictors, kmeans, method = "silhouette", k.max = 15)
   p<-p$data
   numClusters<-as.numeric(p$clusters[which.max(p$y)])
   print(paste("Optimal Number of Clusters found Through Silhouette Index:",numClusters))
   return(numClusters)
}

# ************************************************
# summaryPercentage():
# Calculates percentage for input field
# 
# INPUT:   integer - input - occurences out of total
#          integer - total - total number of occurences
# 
# OUTPUT : double - percentage
# ************************************************
summaryPercentage<-function(input, total) {
  return((input/total)*100)
}

# ************************************************
# printClusterProfiles() :
# Prints cluster profiles for passed in cluster model
# INPUT:  string  -  title - title for each cluster profile
#         list - clusterModel - list of cluster profiles
#         integer - clusterNum - number of clusters
#         dataframe - originalDataset - original dataframe to profile clusters on
# 
# OUTPUT : prints summary of cluster profiles
# ************************************************
printClusterProfiles<-function(title, clusterModel, clusterNum, originalDataset){
  print(paste("Summary for:", title))
  print("*******************************************")
  for (k in 1:clusterNum){
    clusterRecord<-originalDataset[which(clusterModel$cluster==k),]
    totalNumOfGames <- nrow(clusterRecord)
    inHighSales<-clusterRecord$GlobalSales>0.9
    inFranchise<-clusterRecord$inFranchise==1
    print(paste("Clus=",k))
    print(paste("Total number of games in cluster:", totalNumOfGames))
    print(paste("Average Global Sales:", mean(clusterRecord$GlobalSales)))
    print("Percentages:")
    print(paste("High global sales:", summaryPercentage(sum(inHighSales), totalNumOfGames), "%"))
    print(paste("High NA sales:", summaryPercentage(sum(clusterRecord$NASales>0.9), totalNumOfGames), "%"))
    print(paste("High JP sales:", summaryPercentage(sum(clusterRecord$JPSales>0.9), totalNumOfGames), "%"))
    print(paste("High EU sales:", summaryPercentage(sum(clusterRecord$EUSales>0.9), totalNumOfGames), "%"))
    print(paste("High Other sales:", summaryPercentage(sum(clusterRecord$OtherSales>0.9), totalNumOfGames), "%"))
    print(paste("Games in franchise with high sales:", summaryPercentage(sum(inHighSales & inFranchise), totalNumOfGames), "%"))
    print(paste("Games in franchise:", summaryPercentage(sum(inFranchise), totalNumOfGames), "%"))
    print("Percentage of high selling games ratings:")
    print(paste("E:", summaryPercentage(sum(clusterRecord$Rating==0.00), totalNumOfGames), "%"))
    print(paste("EC:", summaryPercentage(sum(clusterRecord$Rating==0.25), totalNumOfGames), "%"))
    print(paste("E10+:", summaryPercentage(sum(clusterRecord$Rating==0.50), totalNumOfGames), "%"))
    print(paste("T:", summaryPercentage(sum(clusterRecord$Rating==0.75), totalNumOfGames), "%"))
    print(paste("M:", summaryPercentage(sum(clusterRecord$Rating==1.00), totalNumOfGames), "%"))
    print("Platform Frequencies of High Sale Games:")
    highSalesPlatform <- clusterRecord[which(inHighSales),33:48]
    platformCumsum <- cumsum(highSalesPlatform)
    platformFreq <- tail(platformCumsum[,which(tail(platformCumsum,1)!= 0)],1)
    print(platformFreq)
    print("Platform Frequencies")
    platform <- clusterRecord[,33:48]
    platformCumsum <- cumsum(platform)
    platformFreq <- tail(platformCumsum[,which(tail(platformCumsum,1)!= 0)],1)
    print(platformFreq)
    print("------------------------------------------")
  }
}

# ************************************************
# applyKmeans_printPlotAndProfiles() :
# Applies Kmeans clustering and print plot and summary
# INPUT:  dataframe - predictors - dataframe of predictors to use for clustering
#         integer - clusterNum - number of clusters
#         dataframe - originalDataset - original dataframe to profile clusters on
#         string - title - title for each cluster profile
# 
# ************************************************
# prints plots of clustering and cluster profiles
# ************************************************
# Uses   library(factoextra)
# https://cran.r-project.org/web/packages/factoextra/index.html
# ************************************************
applyKmeans_printPlotAndProfiles<-function(predictors, clusterNum, originalDataset, title){
      kMeansModel <- kmeans(x=predictors, centers=clusterNum, iter.max = 10, nstart=10)
      p<-factoextra::fviz_cluster(kMeansModel, data=predictors,geom = "point") +
                labs(title=title)
      print(p)
      printClusterProfiles(title, kMeansModel, clusterNum, originalDataset)
}

# ************************************************
# applyHierarchical_printPlotAndProfiles() :
# Applies hierarchical clustering and print plot and summary
# INPUT:  dataframe - predictors - dataframe of predictors to use for clustering
#         integer - clusterNum - number of clusters
#         dataframe - originalDataset - original dataframe to profile clusters on
#         string - title - title for each cluster profile
#         string - xAxis - column to plot on x axis of plot
#         string - yAxis - column to plot on y axis of plot
# 
# ************************************************
#  Prints plots of hierarchical clustering and summary of cluster profiles
# ************************************************
# Uses   library(ggplot2)
# https://ggplot2.tidyverse.org/
# ************************************************
applyHierarchical_printPlotAndProfiles<-function(predictors, clusterNum, originalDataset, 
                                                 title, xAxis, yAxis){
    result <- hcut(predictors, k = clusterNum, hc_method = "complete")

    cols_to_denormalize <- c('NASales', 'EUSales', 'JPSales', 'OtherSales', 'GlobalSales')
    clustering_predictors_real_values <- denormalizeColumns(predictors, cols_to_denormalize, MIN_MAX_SUMMARY)
    
    p<-ggplot(clustering_predictors_real_values, aes(x=(!!as.symbol(xAxis)), y=(!!as.symbol(yAxis)))) + 
        geom_point(aes(color = factor(result$cluster))) + 
        labs(title=title) +
        theme(aspect.ratio=1) +
        scale_colour_discrete("Cluster Num")
    
    print(p)
    printClusterProfiles(title, result, clusterNum, originalDataset)
}


# ************************************************
# genreKmeansClustering() :
#
# Applies k-means clustering on all genre subsets of the clustering dataset.
#
# INPUT:  dataframe - dataset - input dataframe
#         vector - genre_list - list of genres
#         dataframe - original_dataset - original complete dataframe
#
# ************************************************
# Plots cluster diagrams for every genre in "genres" list
# ************************************************
genreKmeansClustering <- function(dataset, genre_list, original_dataset){
    for (genre in genre_list){
      genre_cluster_predictors <- splitDataBy(dataset, genre)
      clustering_predictors <- genre_cluster_predictors[names(genre_cluster_predictors)]
      #not including YearofRelease makes the clustering less distinct
      clustering_predictors <- subset(clustering_predictors, select = -c(7:44, YearofRelease)) #with franchise but without all encoded columns, YearofRelease and Demographic Cols
      numKmeansClusters <- determineClusterNum(clustering_predictors)
      #Plots a graph and summary for each genre
      applyKmeans_printPlotAndProfiles(clustering_predictors, numKmeansClusters, original_dataset, genre)
    }
}

# ************************************************
# genreHierarchicalClustering() :
#
# Applies hierarchical clustering on all genre subsets of the clustering dataset.
#
# INPUT:  dataframe- dataset - input dataframe
#         list - genre_list - list of genres
#         list - cluster_list - list of optimal number of clusters derived from dendrograms
#         dataframe - original_dataset - original complete dataframe
#         string - xAxis - column to plot on x axis of plot
#         string - yAxis - column to plot on y axis of plot
#
# ************************************************
# Plots cluster diagrams for every genre in "genres" list
# ************************************************
genreHierarchicalClustering <- function(dataset, genre_list, cluster_list,
                                        original_dataset, 
                                        xAxis="NASales", yAxis="JPSales"){
    i<-1
    for (genre in genre_list){
      genre_cluster_predictors <- splitDataBy(dataset, genre)
      clustering_predictors <- genre_cluster_predictors[names(genre_cluster_predictors)]
      #not including YearofRelease makes the clustering less distinct
      clustering_predictors <- subset(clustering_predictors, select = -c(7:44, YearofRelease)) #with franchise but without all encoded columns, YearofRelease and Demographic Cols
      numOfClusters <- cluster_list[i]
      #Plots a graph and summary for each genre
      applyHierarchical_printPlotAndProfiles(clustering_predictors, numOfClusters, 
        original_dataset, genre, xAxis, yAxis)
      i<-i+1
    }
}

# ************************************************
# genreDendrogram() :
#
# Applies hierarchical clustering on all genre subsets of the clustering dataset.
#
# INPUT:  dataframe- dataset - input dataframe
#         list - genre_list - list of genres
#
# ************************************************
# Plots cluster diagrams for every genre in "genres" list
# ************************************************
genreDendrogram <- function(dataset, genre_list){
    for (genre in genre_list){
      genre_cluster_predictors <- splitDataBy(dataset, genre)
      clustering_predictors <- genre_cluster_predictors[names(genre_cluster_predictors)]
      #not including YearofRelease makes the clustering less distinct
      clustering_predictors <- subset(clustering_predictors, select = -c(7:44, YearofRelease)) #with franchise but without all encoded columns, YearofRelease and Demographic Cols
      numKmeansClusters <- determineClusterNum(clustering_predictors)
      
      #plot dendrogram
      result <- hcut(clustering_predictors, k=numKmeansClusters, hc_method = "complete")
      p<-factoextra::fviz_dend(result, show_labels = TRUE) + 
        labs(title=paste("Genre:", genre))
      print(p)
    }
}

# ******************************************************************************
# modify_dataset()
# Clone the dataset 'main_df' with changes shuffle,
# remove_char_columns, remove_col, dict_rename_col
# 
# INPUT:  df                - main_df             - that one ones to modify
#         boolean           - shuffle             - shuffling dataset
#         boolean           - remove_char_columns - removing columns which are characters
#         vector            - dict_rename_col     - columns that should be renamed
#         vector            - remove_col          - columns that have to be removed
# ******************************************************************************
modify_dataset<-function(main_df, shuffle=FALSE, remove_char_columns=FALSE, remove_col=c(), dict_rename_col=NA){
    if (shuffle == TRUE){
        main_df <- main_df[sample(1:nrow(main_df)),]
    }
    if (length(remove_col) > 0){
        main_df <- main_df %>% select(-one_of(remove_col))
    }
    if (remove_char_columns==TRUE){
        main_df <- main_df[, sapply(main_df, class) != 'character']
    }
    if (!is.na(dict_rename_col)){
        main_df <- alterDataframeNames(main_df, dict_rename_col )
    }

    return (main_df)
}


# ************************************************
# character_to_class()
# Alter a column of a dataframe from character to 
# numerical classes based on uniqueness of the value
# 
# INPUT:      data frame -   df  - original dataframe
#             data frame - field - column name
#
# OUTPUT :    data frame - a new column with classes
# ************************************************
character_to_class <- function(df, field) {
    unique_dict <- unique(games[,field])
    print(unique_dict)
    
    new_column <- as.numeric(apply(df[field], 2, function(x) match(x, unique_dict)))
                                  
    return(list(append_column = new_column, dict = unique_dict))
}
   
# ************************************************
# most_frequent_games()
# calculating X most frequent games in the dataset
#
# INPUT :    data frame - df 
# ************************************************
most_frequent_games <- function(df,how_many){
    df <- df %>% select('keywords' = 1)
    most5FreqGames <- tail(names(sort(table(df$keywords))), how_many)
    return (most5FreqGames)
}
                                   
    

# ************************************************
# NEURAL NETWORKS
# ************************************************

# ************************************************
# NN_regression_data() :
#
# create train and test datasets from the parent set
#
# INPUT:   data frame    - dataset   - complete data set
#
# OUTPUT : list("train", "test") - contains train and test datasets
#
# ************************************************
NN_regression_data <- function(games_df){
  shuffled_games_nn <- games_df[sample(1:nrow(games_df)), ]
  train_bound_nn <- round(nrow(shuffled_games_nn)*(TRAINING_SPLIT))

  train_set <- shuffled_games_nn[1:train_bound_nn, ]
  test_set <- shuffled_games_nn[-(1:train_bound_nn), ]

  return(list("train" = train_set, "test" = test_set))
}

# ************************************************
# NN_features_labels() :
#
# creates feature and labels tags for data
#
# INPUT:   data frame    - dataset   - either the test or the train dataset
#
# OUTPUT : list("features", "labels") - features is all values to train/predict a model. labels are the sales numbers.
#
# ************************************************
NN_features_labels <- function(data_set){
  data_features <- data_set %>% select(-GlobalSales)
  data_labels <- data_set %>% select(GlobalSales)

  return(list("features" = data_features, "labels" = data_labels))
}

# ************************************************
# NN_value_split_data() :
#
# Splits dataset into high and low selling games, also splits into test and train set
#
# INPUT:   data frame    - dataset   - full dataset
#
# OUTPUT : list("low_train", "low_test", "high_train", "high_test") - features is all values to train/predict a model. labels are the sales numbers.
#
# ************************************************
NN_value_split_data <- function(data_set){
  low_value_data     <- subset(data_set, GlobalSales <= 1)
  high_value_data    <- subset(data_set, GlobalSales > 2)

  low_train_data     <- NN_features_labels(NN_regression_data(low_value_data)$train)
  low_test_data      <- NN_features_labels(NN_regression_data(low_value_data)$test)

  high_train_data    <- NN_features_labels(NN_regression_data(high_value_data)$train)
  high_test_data     <- NN_features_labels(NN_regression_data(high_value_data)$test)

  return(list("low_train" = low_train_data, "low_test" = low_test_data, "high_train" = high_train_data, "high_test" = high_test_data))
}

# ************************************************
# NN_train_network() :
#
# creates, compiles and trains neural network for regression
#
# INPUT: 
#       - data frame - train features dataset - all columns needing to train the NN
#       - data frame or vector - labels for training data - GlobalSales for the training set
#
# OUTPUT : keras model - trained model - model used during training, can be used to predict values
#
# ************************************************
# Model Creation and Training
# Uses   library(keras)
# https://cran.r-project.org/package=keras
# ************************************************
NN_train_network <- function(train_features, train_labels){
  sales_model <- keras_model_sequential(input_shape = c(13)) %>%
      layer_dense(64, activation = 'relu') %>%
      layer_dropout(0.2) %>%
      layer_dense(128, activation = 'relu') %>%
      layer_dropout(0.2) %>%
      layer_dense(128, activation = 'relu') %>%
      layer_dropout(0.2) %>%
      layer_dense(64, activation = 'relu') %>%
      layer_dense(1)

  x <- tf$ones(shape(1,13))
  y <- sales_model(x)

  sales_model %>% compile(
    optimizer = optimizer_adam(learning_rate = 0.01),
    loss = loss_mean_squared_error(),
    metrics = c(metric_root_mean_squared_error())
  )

  summary(sales_model)

  history <- sales_model %>% fit(
      as.matrix(train_features),
      as.matrix(train_labels),
      validation_split = VALIDATION_SPLIT,
      epochs = 200,
      verbose = 2
  )
  plot(history)

  return(list(history= history, sales_model= sales_model))
}

# ************************************************
# Time Series
# ************************************************

# ************************************************
# createTimeSeries() :
#
# creates a timeseries from the dataset provided
#
# INPUT: data frame      - dataset     - input data
#
# OUTPUT : time series
# ************************************************

createTimeSeries <- function(dataset, genre) {
    TimeSeriesGenre = subset(dataset, dataset$Genre == genre)[, c("ReleaseDate", "GlobalSales")]
    TimeSeriesGenre$ReleaseDate <- as.Date(TimeSeriesGenre$ReleaseDate, "%B %d, %Y")
    distinctDatedTimeSeries <- distinct(TimeSeriesGenre, ReleaseDate, .keep_all = TRUE)
    filteredTimeSeries <- distinctDatedTimeSeries[distinctDatedTimeSeries$GlobalSales < 0.5, ]
    filteredTimeSeries <- filteredTimeSeries[!is.na(filteredTimeSeries$ReleaseDate),]
    rownames(filteredTimeSeries) <- filteredTimeSeries$ReleaseDate
    filteredTimeSeries <- filteredTimeSeries[with(filteredTimeSeries, order(ReleaseDate)),]
    return (subset(filteredTimeSeries, select = -c(ReleaseDate)))
}

# ************************************************
# plotTimeSeriesForGenre() :
#
# creates a timeseries from the dataset provided
#
# INPUT: data frame - dataset - input data
#        string - genre - genre of games to plot as timeseries

# Prints plots of timeseries for a genre
# ************************************************
  
  plotTimeSeriesForGenre <- function(dataset, genre) {
    timeSeries <- createTimeSeries(dataset, genre)
    finalTimeSeries <- as.timeSeries(timeSeries) 
    plot(finalTimeSeries, at="chic", plot.type="s", cex.axis=0.75)
  }


# ************************************************
# decomposeTimeSeries() :
#
# plot decomposed time series: seasonal and trend graphs
#
# INPUT: time series - timeSeries - timeSeries of games in a genre
#        string - genre - genre of games in timeseries

# Prints plots of seasonal and trend graphs for timeseries for a genre
# ************************************************
  
  plotDecomposedTimeSeries <- function(timeSeries, genre) {
    tsGlobalSales = ts(timeSeries, frequency  = 365/12) #12 monthly / 4 seasonal
    decomposeGlobalSales = decompose(tsGlobalSales, "multiplicative")
    plot(decomposeGlobalSales$trend, main = paste("Global Sales trend for", genre))
    plot(decomposeGlobalSales$seasonal, main = paste("Global Sales seasonal trend for", genre))
  }


# ************************************************
#                DECISION TREES                  #
# ************************************************
  
  # ************************************************
# DT_data() :
#
# Creates train and test datasets for decision trees
#
# INPUT: data frame - dataset - complete dataset
#  
#
# OUTPUT : list("train", "test") - train and test data frames 
#
# ************************************************
DT_data <- function(data_set){
    train_data <- data_set %>% select(-c(NASales, EUSales, JPSales, OtherSales, Name, Publisher, Developer, ReleaseDate, CriticCount, UserCount, CriticScore, UserScore))
    
    # filter out games that have over 20 million sales
    train_data <- subset(train_data, GlobalSales < 20)

    train_data <- as.data.frame(train_data)
    train_data <- na.omit(train_data)

    tree_shuffled_games_nn <- train_data[sample(1:nrow(train_data)), ]

    tree_shuffled_games_nn_training_boundary <- round(nrow(tree_shuffled_games_nn)*(TRAINING_SPLIT))

    tree_shuffled_games_nn_train_set_nn <- tree_shuffled_games_nn[1:tree_shuffled_games_nn_training_boundary, ]
    tree_shuffled_games_nn_test_set_nn <- tree_shuffled_games_nn[-(1:tree_shuffled_games_nn_training_boundary), ]
        
    return(list("train" = tree_shuffled_games_nn_train_set_nn, "test" = tree_shuffled_games_nn_test_set_nn))
}

# ************************************************
# DT_log_data() :
#
# Creates train and test datasets for decision trees for values of log(GlobalSales)
#
# INPUT: data frame - dataset - complete dataset
#  
#
# OUTPUT : list("train", "test") - train and test data frames 
#
# ************************************************
DT_log_data <- function(data_set){
    train_data <- data_set %>% select(-c(NASales, EUSales, JPSales, OtherSales))
    
    # filter out games that have over 20 million sales
    train_data <- subset(train_data, GlobalSales < 20)
    train_data$log_sales <- log10(train_data$GlobalSales)
    train_data <- train_data %>% select(-c(GlobalSales))
    
    train_data <- as.data.frame(train_data)
    train_data <- na.omit(train_data)

    tree_shuffled_games_nn <- train_data[sample(1:nrow(train_data)), ]

    tree_shuffled_games_nn_training_boundary <- round(nrow(tree_shuffled_games_nn)*(TRAINING_SPLIT))

    tree_shuffled_games_nn_train_set_nn <- tree_shuffled_games_nn[1:tree_shuffled_games_nn_training_boundary, ]
    tree_shuffled_games_nn_test_set_nn <- tree_shuffled_games_nn[-(1:tree_shuffled_games_nn_training_boundary), ]
        
    return(list("train" = tree_shuffled_games_nn_train_set_nn, "test" = tree_shuffled_games_nn_test_set_nn))
}

Setting up Libraries¶

In [ ]:
# Downloading the library if not installed and activating them

# Uncomment if tensorflow is not installed
# install_tensorflow()

install.packages("pacman")
library(pacman)
pacman::p_load(char=MYLIBRARIES,install=TRUE,character.only=TRUE)
Installing package into ‘/usr/local/lib/R/site-library’
(as ‘lib’ is unspecified)

Installing package into ‘/usr/local/lib/R/site-library’
(as ‘lib’ is unspecified)


outliers installed

Installing package into ‘/usr/local/lib/R/site-library’
(as ‘lib’ is unspecified)


corrplot installed

Installing package into ‘/usr/local/lib/R/site-library’
(as ‘lib’ is unspecified)

also installing the dependency ‘htmlwidgets’



formattable installed

Installing package into ‘/usr/local/lib/R/site-library’
(as ‘lib’ is unspecified)

also installing the dependencies ‘listenv’, ‘parallelly’, ‘future’, ‘globals’, ‘future.apply’, ‘numDeriv’, ‘progressr’, ‘SQUAREM’, ‘lava’, ‘prodlim’, ‘proxy’, ‘iterators’, ‘Rcpp’, ‘clock’, ‘gower’, ‘hardhat’, ‘ipred’, ‘timeDate’, ‘e1071’, ‘foreach’, ‘ModelMetrics’, ‘plyr’, ‘pROC’, ‘recipes’, ‘reshape2’



caret installed

Warning message in system("timedatectl", intern = TRUE):
“running command 'timedatectl' had status 1”
Installing package into ‘/usr/local/lib/R/site-library’
(as ‘lib’ is unspecified)

also installing the dependencies ‘xts’, ‘quadprog’, ‘zoo’



PerformanceAnalytics installed

Installing package into ‘/usr/local/lib/R/site-library’
(as ‘lib’ is unspecified)

also installing the dependencies ‘FNN’, ‘dbscan’, ‘igraph’



smotefamily installed

Installing package into ‘/usr/local/lib/R/site-library’
(as ‘lib’ is unspecified)


kohonen installed

Installing package into ‘/usr/local/lib/R/site-library’
(as ‘lib’ is unspecified)

also installing the dependencies ‘SparseM’, ‘MatrixModels’, ‘minqa’, ‘nloptr’, ‘RcppEigen’, ‘lazyeval’, ‘later’, ‘carData’, ‘pbkrtest’, ‘quantreg’, ‘lme4’, ‘crosstalk’, ‘promises’, ‘estimability’, ‘mvtnorm’, ‘xtable’, ‘viridis’, ‘car’, ‘DT’, ‘ellipse’, ‘emmeans’, ‘flashClust’, ‘leaps’, ‘multcompView’, ‘scatterplot3d’, ‘ggsci’, ‘cowplot’, ‘ggsignif’, ‘gridExtra’, ‘polynom’, ‘rstatix’, ‘abind’, ‘dendextend’, ‘FactoMineR’, ‘ggpubr’, ‘ggrepel’



factoextra installed

Installing package into ‘/usr/local/lib/R/site-library’
(as ‘lib’ is unspecified)

also installing the dependencies ‘dotCall64’, ‘spam’, ‘maps’, ‘fields’, ‘CircStats’, ‘dtw’



verification installed

Installing package into ‘/usr/local/lib/R/site-library’
(as ‘lib’ is unspecified)

also installing the dependencies ‘RcppTOML’, ‘here’, ‘png’, ‘config’, ‘reticulate’, ‘tfruns’, ‘tfautograph’



tensorflow installed

Installing package into ‘/usr/local/lib/R/site-library’
(as ‘lib’ is unspecified)

also installing the dependency ‘zeallot’



keras installed

Installing package into ‘/usr/local/lib/R/site-library’
(as ‘lib’ is unspecified)

also installing the dependency ‘reshape’



GGally installed

Installing package into ‘/usr/local/lib/R/site-library’
(as ‘lib’ is unspecified)


randomForest installed

Installing package into ‘/usr/local/lib/R/site-library’
(as ‘lib’ is unspecified)

also installing the dependencies ‘bitops’, ‘RCurl’



h2o installed

Installing package into ‘/usr/local/lib/R/site-library’
(as ‘lib’ is unspecified)


timeSeries installed

Installing package into ‘/usr/local/lib/R/site-library’
(as ‘lib’ is unspecified)

also installing the dependencies ‘RRF’, ‘arules’, ‘gbm’, ‘xgboost’



inTrees installed

In [ ]:
# Checking if Tensorflow works
tf$constant("Hello Tensorflow!")
Loaded Tensorflow version 2.9.2

tf.Tensor(b'Hello Tensorflow!', shape=(), dtype=string)

Datasets¶

In [ ]:
# Reading the datasets
games<-datasetRead(VIDEOGAME_DATASET, TRUE)
# Creating a copy of ds games for data analysis (Manuel)
games_temporary <- games

# Checking if scraped data is in the directory and if not 
# Making a new file with scraped data
if(file.exists(SCRAPED_DATASET)){
    print("Scraped data found") 
} else {
    print("Scraped data not found; Beginning scraping")
    scrapeGames(games, "scraped_game_data.csv")
}

# Reading the scraped dataset and changing the inputs to integers
scraped_data<-datasetRead(SCRAPED_DATASET, TRUE)
scraped_data$UserReview <- as.integer(scraped_data$UserReview)
scraped_data$CriticReviews <- as.integer(scraped_data$CriticReviews)
scraped_data$ReleaseYear <- as.integer(scraped_data$ReleaseYear)
[1] "Read VideoGameSalesData.csv . Rows =  16719 Features:"
 [1] "Name"          "Platform"      "YearofRelease" "Genre"        
 [5] "Publisher"     "NASales"       "EUSales"       "JPSales"      
 [9] "OtherSales"    "GlobalSales"   "CriticScore"   "CriticCount"  
[13] "UserScore"     "UserCount"     "Developer"     "Rating"       
[1] "Scraped data found"
[1] "Read scraped_game_data.csv . Rows =  7429 Features:"
[1] "Name"          "Platform"      "ReleaseDate"   "ReleaseYear"  
[5] "CriticReviews" "UserReview"   
Warning message in eval(expr, envir, enclos):
“NAs introduced by coercion”
Warning message in eval(expr, envir, enclos):
“NAs introduced by coercion”
Warning message in eval(expr, envir, enclos):
“NAs introduced by coercion”

Data Pre-Processing¶

NA Values¶

In [ ]:
# Clean original dataset to unify NA values
games <- unifyNAValues(games)

# Overview of all our missing data
na_rows <- NAValuesSummary(games)
[1] "Total number of rows with NA values: 9895"
[1] "Summary of NA values:"
         Name      Platform YearofRelease         Genre     Publisher 
            2             0           269             2            54 
      NASales       EUSales       JPSales    OtherSales   GlobalSales 
            0             0             0             0             0 
  CriticScore   CriticCount     UserScore     UserCount     Developer 
         8582          8582          9129          9129          6623 
       Rating 
         6772 

Scraped Data¶

In [ ]:
games$UserScore <- as.integer(games$UserScore)
games$YearofRelease <- as.integer(games$YearofRelease)

# Rename scraped_data columns so they match columns from games dataset
scraped_data <- scraped_data %>% 
  rename(
    YearofRelease = ReleaseYear,
    CriticScore = CriticReviews,
    UserScore = UserReview,
  )

scraped_data <- transform(scraped_data, CriticScore = as.numeric(CriticScore))

# Combining scraped data with games data on Name and Platform
games <- left_join(games, scraped_data[c('Name', 'Platform', 'ReleaseDate', 'YearofRelease', 'CriticScore', 'UserScore')], by=c('Name'='Name', 'Platform' = 'Platform'))

# Merging YearofRelease, CriticScore and UserScore columns to fill NA values
games<-games %>% 
    mutate(YearofRelease = coalesce(YearofRelease.x,YearofRelease.y)) %>%
    mutate(CriticScore = coalesce(CriticScore.x,CriticScore.y)) %>%
    mutate(UserScore = coalesce(UserScore.x,UserScore.y)) %>%
    select(!ends_with('.y') & !ends_with('.x'))
In [ ]:
# Visualise how scraping improved our data
na_rows_after_scraping <- NAValuesSummary(games)

# Dropping all rows that don't have release year as demographic data will not be available
games <- games[complete.cases(games$YearofRelease),]
[1] "Total number of rows with NA values: 11806"
[1] "Summary of NA values:"
         Name      Platform         Genre     Publisher       NASales 
            2             0             2            55             0 
      EUSales       JPSales    OtherSales   GlobalSales   CriticCount 
            0             0             0             0          8582 
    UserCount     Developer        Rating   ReleaseDate YearofRelease 
         9129          6623          6772          9297           143 
  CriticScore     UserScore 
         7764          8818 

Joining with Other Datasets¶

In [ ]:
# These are the datasets that we want to join with the main game dataset
ages<-datasetRead(AGE_DATASET, TRUE)
genders<-datasetRead(GENDER_DATASET, TRUE)
country2continent<-datasetRead(COUNTRY2CONTINENT_DATASET)

# Combining the two age columns to remove NAs (if one column has a value, the other will be NA and vice versa)
# Then selecting the columns without the two that were combined to be saved
ages<-ages %>% 
    mutate(age = coalesce(MedianageSexallAgeallVariantestimates,MedianageSexallAgeallVariantmedium)) %>%
    select(Entity, Code, Year, age)

# Joining the age and gender demographics by 3 columns - Entity (i.e. the country), Code, and Year
age_gender <- left_join(ages, genders, by=c('Entity','Code','Year'))
# Joining the joint age and gender table with the country 2 coninents which will get the required regions based on the country code
demographics <- left_join(age_gender, country2continent[c('continent', 'sub_region', 'code_3')], by=c('Code'='code_3'))

# Removing the rows which have NA rows
demo <- demographics[complete.cases(demographics$continent),]

summarized_demographics <- group_regions(demo, other=TRUE)

# Changing the Year of Release to be numeric (in order to match the other table)
games <- games %>% 
    mutate(YearofRelease = as.numeric(YearofRelease))

# Joining the games table with the demographics by the year of release
games<-left_join(games, summarized_demographics, by=c('YearofRelease'="year"), all=TRUE,sort=FALSE)
head(games)
[1] "Read median-age.csv . Rows =  38505 Features:"
[1] "Entity"                               
[2] "Code"                                 
[3] "Year"                                 
[4] "MedianageSexallAgeallVariantestimates"
[5] "MedianageSexallAgeallVariantmedium"   
[1] "Read gender-ratio.csv . Rows =  12740 Features:"
[1] "Entity"                            "Code"                             
[3] "Year"                              "Populationfemaleoftotalpopulation"
[1] "Read country2continent.csv . Rows =  249 Features:"
[1] "country"         "code_2"          "code_3"          "country_code"   
[5] "iso_3166_2"      "continent"       "sub_region"      "region_code"    
[9] "sub_region_code"
[1] "Northern America"
Warning message:
“Using an external vector in selections was deprecated in tidyselect 1.1.0.
ℹ Please use `all_of()` or `any_of()` instead.
  # Was:
  data %>% select(year)

  # Now:
  data %>% select(all_of(year))

See <https://tidyselect.r-lib.org/reference/faq-external-vector.html>.”
Warning message:
“Using an external vector in selections was deprecated in tidyselect 1.1.0.
ℹ Please use `all_of()` or `any_of()` instead.
  # Was:
  data %>% select(col_name)

  # Now:
  data %>% select(all_of(col_name))

See <https://tidyselect.r-lib.org/reference/faq-external-vector.html>.”
`summarise()` has grouped output by 'Year'. You can override using the
`.groups` argument.
[1] "Japan"
`summarise()` has grouped output by 'Year'. You can override using the
`.groups` argument.
[1] "Europe"
`summarise()` has grouped output by 'Year'. You can override using the
`.groups` argument.
[1] "Other"
A data.frame: 6 × 25
NamePlatformGenrePublisherNASalesEUSalesJPSalesOtherSalesGlobalSalesCriticCount⋯CriticScoreUserScoreNorthernAmerica_ageMedianNorthernAmerica_femaleRatioMedianJapan_ageMedianJapan_femaleRatioMedianEurope_ageMedianEurope_femaleRatioMedianOther_ageMedianOther_femaleRatioMedian
<chr><chr><chr><chr><dbl><dbl><dbl><dbl><dbl><int>⋯<dbl><int><dbl><dbl><dbl><dbl><dbl><dbl><dbl><dbl>
1Wii Sports WiiSports Nintendo41.3628.96 3.778.4582.5351⋯76 837.950.5295042.851.0155138.151.0420622.7550.17136
2Super Mario Bros. NESPlatform Nintendo29.08 3.58 6.810.7740.24NA⋯NANA30.050.6461134.550.6514233.151.2746118.3050.15042
3Mario Kart Wii WiiRacing Nintendo15.6812.76 3.793.2935.5273⋯82 838.350.5127743.551.0539638.851.0186223.1050.14828
4Wii Sports Resort WiiSports Nintendo15.6110.93 3.282.9532.7773⋯80 838.550.5058843.951.0712339.050.9771123.5550.12598
5Pokemon Red/Pokemon BlueGB Role-PlayingNintendo11.27 8.8910.221.0031.37NA⋯NANA33.350.6678439.350.8044835.551.2787319.7550.24406
6Tetris GB Puzzle Nintendo23.20 2.26 4.220.5830.26NA⋯NANA31.450.6981436.450.7050133.951.1996318.7050.24149

Detecting and Cleaning Outliers¶

In [ ]:
# Set initial field types
field_types <- InitialFieldTypes(games)

# Categorise the numerical fields
field_types <- NPREPROCESSING_discreteNumeric(games, field_types, DN_CUTOFF)
[1] "Numeric Fields:  18"
 [1] "NASales"                           "EUSales"                          
 [3] "JPSales"                           "OtherSales"                       
 [5] "GlobalSales"                       "CriticCount"                      
 [7] "UserCount"                         "YearofRelease"                    
 [9] "CriticScore"                       "UserScore"                        
[11] "NorthernAmerica_ageMedian"         "NorthernAmerica_femaleRatioMedian"
[13] "Japan_ageMedian"                   "Japan_femaleRatioMedian"          
[15] "Europe_ageMedian"                  "Europe_femaleRatioMedian"         
[17] "Other_ageMedian"                   "Other_femaleRatioMedian"          
[1] "Symbolic Fields:  7"
[1] "Name"        "Platform"    "Genre"       "Publisher"   "Developer"  
[6] "Rating"      "ReleaseDate"
In [ ]:
# Since some fields were categorised incorrectly, assign the correct field types
# to their designated fields.

# Disctionary of field names and the correct types they need to be assigned
manual_change_fields <- c("YearofRelease"=TYPE_DISCRETE, "GlobalSales"=TYPE_ORDINAL, "NASales"=TYPE_ORDINAL, "EUSales"=TYPE_ORDINAL, "JPSales"=TYPE_ORDINAL, "OtherSales"=TYPE_ORDINAL, "UserCount"=TYPE_ORDINAL, "UserScore"=TYPE_ORDINAL)
field_types <- changeManual_fieldType(games, field_types, manual_change_fields)

# Corrected typing
results<-data.frame(field=names(games),types=field_types)
print(results)

#Displaying ordinal field 
ordinals<-games[,which(field_types=="ORDINAL")] 
head(ordinals)
                               field    types
1                               Name SYMBOLIC
2                           Platform SYMBOLIC
3                              Genre SYMBOLIC
4                          Publisher SYMBOLIC
5                            NASales  ORDINAL
6                            EUSales  ORDINAL
7                            JPSales  ORDINAL
8                         OtherSales  ORDINAL
9                        GlobalSales  ORDINAL
10                       CriticCount  ORDINAL
11                         UserCount  ORDINAL
12                         Developer SYMBOLIC
13                            Rating SYMBOLIC
14                       ReleaseDate SYMBOLIC
15                     YearofRelease DISCRETE
16                       CriticScore  ORDINAL
17                         UserScore  ORDINAL
18         NorthernAmerica_ageMedian  ORDINAL
19 NorthernAmerica_femaleRatioMedian  ORDINAL
20                   Japan_ageMedian  ORDINAL
21           Japan_femaleRatioMedian  ORDINAL
22                  Europe_ageMedian  ORDINAL
23          Europe_femaleRatioMedian  ORDINAL
24                   Other_ageMedian  ORDINAL
25           Other_femaleRatioMedian  ORDINAL
A data.frame: 6 × 17
NASalesEUSalesJPSalesOtherSalesGlobalSalesCriticCountUserCountCriticScoreUserScoreNorthernAmerica_ageMedianNorthernAmerica_femaleRatioMedianJapan_ageMedianJapan_femaleRatioMedianEurope_ageMedianEurope_femaleRatioMedianOther_ageMedianOther_femaleRatioMedian
<dbl><dbl><dbl><dbl><dbl><int><int><dbl><int><dbl><dbl><dbl><dbl><dbl><dbl><dbl><dbl>
141.3628.96 3.778.4582.535132276 837.950.5295042.851.0155138.151.0420622.7550.17136
229.08 3.58 6.810.7740.24NA NANANA30.050.6461134.550.6514233.151.2746118.3050.15042
315.6812.76 3.793.2935.527370982 838.350.5127743.551.0539638.851.0186223.1050.14828
415.6110.93 3.282.9532.777319280 838.550.5058843.951.0712339.050.9771123.5550.12598
511.27 8.8910.221.0031.37NA NANANA33.350.6678439.350.8044835.551.2787319.7550.24406
623.20 2.26 4.220.5830.26NA NANANA31.450.6981436.450.7050133.951.1996318.7050.24149
In [ ]:
# Plot all of the outliers based on Chi Squared test and choose to ignore,
# remove or replace the outlier values.
games_TS <- cbind(games)
games_keep_outliers <- NPREPROCESSING_outlier(games, field_types, 0.99, "ignore")
games <- NPREPROCESSING_outlier(games, field_types, CONFIDENCE, "remove")
[1] "NO REPLACEMENT: Outlier field= NASales #Records= 228"
[1] "NO REPLACEMENT: Outlier field= EUSales #Records= 257"
[1] "NO REPLACEMENT: Outlier field= JPSales #Records= 289"
[1] "NO REPLACEMENT: Outlier field= OtherSales #Records= 214"
[1] "NO REPLACEMENT: Outlier field= GlobalSales #Records= 237"
[1] "NO REPLACEMENT: Outlier field= NorthernAmerica_ageMedian #Records= 367"
[1] "NO REPLACEMENT: Outlier field= NorthernAmerica_femaleRatioMedian #Records= 534"
[1] "NO REPLACEMENT: Outlier field= Japan_ageMedian #Records= 262"
[1] "NO REPLACEMENT: Outlier field= Japan_femaleRatioMedian #Records= 305"
[1] "NO REPLACEMENT: Outlier field= Europe_ageMedian #Records= 262"
[1] "NO REPLACEMENT: Outlier field= Other_ageMedian #Records= 221"
[1] "DELETED RECORDS: Outlier field= NASales #Records= 371"
[1] "DELETED RECORDS: Outlier field= EUSales #Records= 554"
[1] "DELETED RECORDS: Outlier field= JPSales #Records= 472"
[1] "DELETED RECORDS: Outlier field= OtherSales #Records= 442"
[1] "DELETED RECORDS: Outlier field= GlobalSales #Records= 828"
[1] "DELETED RECORDS: Outlier field= NorthernAmerica_ageMedian #Records= 872"
[1] "DELETED RECORDS: Outlier field= NorthernAmerica_femaleRatioMedian #Records= 827"
[1] "DELETED RECORDS: Outlier field= Japan_ageMedian #Records= 470"
[1] "DELETED RECORDS: Outlier field= Japan_femaleRatioMedian #Records= 388"
[1] "DELETED RECORDS: Outlier field= Other_ageMedian #Records= 529"

Normalization¶

In [ ]:
#all numeric columns to be normalized (exclusing YearofRelease)
numeric_cols = colnames(subset(dplyr::select_if(games, is.numeric), select = -c(YearofRelease) ))

#before normalizing save a summary of mins and maxs for each column for denormalization
MIN_MAX_SUMMARY <- minMaxSummary(games[,numeric_cols])

# Apply normalization
games[,numeric_cols] <- sapply(games[,numeric_cols], Nrescale)
head(games)
A data.frame: 6 × 25
NamePlatformGenrePublisherNASalesEUSalesJPSalesOtherSalesGlobalSalesCriticCount⋯CriticScoreUserScoreNorthernAmerica_ageMedianNorthernAmerica_femaleRatioMedianJapan_ageMedianJapan_femaleRatioMedianEurope_ageMedianEurope_femaleRatioMedianOther_ageMedianOther_femaleRatioMedian
<chr><chr><chr><chr><dbl><dbl><dbl><dbl><dbl><dbl>⋯<dbl><dbl><dbl><dbl><dbl><dbl><dbl><dbl><dbl><dbl>
2407Wizards of Waverly Place DS Misc Disney Interactive Studios0.74683540.33333330.00000000.57142861.0000000NA⋯NANA0.65517240.26109150.60975610.70149370.54838710.277957220.56716420.212548
2408Ghostbusters: The Video Game Wii Action Atari 0.74683540.33333330.00000000.50000001.0000000NA⋯NANA0.65517240.26109150.60975610.70149370.54838710.277957220.56716420.212548
2412Endless Ocean: Blue World Wii SimulationNintendo 0.58227850.35000000.27272730.42857141.0000000NA⋯NANA0.65517240.26109150.60975610.70149370.54838710.277957220.56716420.212548
2414Rocky PS2 Fighting Rage Software 0.53164560.55000000.00000000.78571431.0000000NA⋯NANA0.00000001.00000000.00000000.00000000.00000001.000000000.00000001.000000
2417Guitar Hero: Warriors of RockX360Misc Activision 0.59493670.51666670.00000000.57142861.0000000NA⋯NANA0.72413790.19641070.68292680.78005520.61290320.059292550.65671640.169875
2421Pictionary Wii Puzzle THQ 0.75949370.31666670.00000000.50000000.9882353NA⋯NANA0.72413790.19641070.68292680.78005520.61290320.059292550.65671640.169875
In [ ]:
# Removing NA values
games_keep_outliers <- games_keep_outliers[!is.na(games_keep_outliers$Name),]
catagoricalColumns <- c("Genre", "Platform")
print(games_keep_outliers[,catagoricalColumns])
# Process categoricla data
catagoricalReadyforML<-NPREPROCESSING_categorical(games_keep_outliers[,catagoricalColumns])
games_keep_outliers<-cbind(subset(games_keep_outliers, select = -c(Genre, Platform)),
                           catagoricalReadyforML)
Streaming output truncated to the last 5000 lines.
11588   Simulation     X360
11589         Misc       GC
11590       Sports       GC
11591       Action     X360
11592     Fighting      PS2
11593       Action       DS
11594   Simulation       DS
11595       Action      PS2
11596         Misc      PS2
11597 Role-Playing      SAT
11598    Adventure      Wii
11599       Puzzle       DS
11600       Action       GC
11601       Sports       GC
11602      Shooter       DS
11603       Racing      PS4
11604         Misc      Wii
11605         Misc      Wii
11606       Puzzle       DS
11607       Action      3DS
11608       Sports      PS3
11609 Role-Playing       DS
11610    Adventure      Wii
11611   Simulation       DS
11612    Adventure      PSP
11613       Sports       GC
11614       Action      Wii
11615    Adventure      PSP
11616     Platform       XB
11617     Fighting       DS
11618         Misc       DS
11619     Platform      PS2
11620         Misc      PS2
11621      Shooter       PC
11622      Shooter      Wii
11623       Sports       DS
11624     Fighting       DS
11625       Sports      PS2
11626      Shooter     X360
11627     Platform       GC
11628         Misc       PS
11629       Action      Wii
11630       Racing      GBA
11631      Shooter       PS
11632 Role-Playing     SNES
11633 Role-Playing      PS4
11634     Strategy      SAT
11635       Action       PS
11636         Misc      3DS
11637       Puzzle       DS
11638   Simulation       PS
11639       Racing       PC
11640     Strategy      SAT
11641       Racing       PC
11642       Racing       PC
11643       Puzzle      PSP
11644    Adventure     XOne
11645     Fighting      PSP
11646       Racing      PS3
11647       Sports      Wii
11648 Role-Playing      GBA
11649         Misc     X360
11650       Racing       GC
11651       Action      PS4
11652    Adventure      3DS
11653     Strategy      PS2
11654      Shooter       XB
11655      Shooter       GC
11656     Fighting       DS
11657 Role-Playing      PS2
11658 Role-Playing      PSV
11659         Misc      Wii
11660     Strategy      PS2
11661         Misc       DS
11662     Strategy      PS3
11663       Action      Wii
11664       Sports       DS
11665         Misc       DS
11666    Adventure       DS
11667         Misc      3DS
11668     Platform      GBA
11669      Shooter       XB
11670         Misc       XB
11671 Role-Playing      PSP
11672     Platform       PC
11673      Shooter      GBA
11674       Sports     2600
11675         Misc      PS3
11676         Misc      Wii
11677     Platform       XB
11678 Role-Playing      PSV
11679       Racing       GC
11680       Action       XB
11681       Sports       DS
11682       Action      3DS
11683       Racing      PS3
11684         Misc       XB
11685     Fighting      PSP
11686         Misc      Wii
11687   Simulation       DS
11688     Strategy      PS4
11689 Role-Playing       PS
11690     Fighting      PSV
11691     Fighting      PS2
11692       Racing      SAT
11693         Misc      PS2
11694       Action       DS
11695    Adventure       PS
11696       Sports      PSP
11697 Role-Playing      Wii
11698 Role-Playing      PS3
11699     Fighting     XOne
11700    Adventure      PSV
11701     Fighting      Wii
11702    Adventure      PSP
11703 Role-Playing      PS2
11704       Sports     2600
11705     Fighting      3DS
11706       Sports      PS3
11707       Action      Wii
11708       Racing      SCD
11709 Role-Playing      3DS
11710 Role-Playing     XOne
11711       Sports       DS
11712    Adventure       DS
11713       Puzzle       PS
11714    Adventure      Wii
11715         Misc      PSP
11716         Misc      PS3
11717     Platform      PS2
11718     Platform      GBA
11719      Shooter      PS3
11720    Adventure      Wii
11721     Platform       XB
11722         Misc      PSP
11723       Action       DS
11724         Misc      Wii
11725     Platform      GBA
11726     Fighting       PS
11727       Sports       PS
11728       Action     X360
11729       Action      PSP
11730    Adventure      3DS
11731       Racing       PC
11732       Action      PS2
11733       Action       XB
11734     Strategy       GC
11735       Sports      PSP
11736    Adventure      PSV
11737       Action      PSV
11738    Adventure      SAT
11739       Racing      PS3
11740    Adventure       DS
11741       Sports      PSV
11742 Role-Playing      PSP
11743       Action      PS3
11744 Role-Playing       PC
11745     Platform      PSP
11746      Shooter      Wii
11747 Role-Playing      3DS
11748   Simulation      3DS
11749      Shooter      GBA
11750         Misc      Wii
11751       Sports       PS
11752     Fighting     X360
11753    Adventure      PSV
11754   Simulation     X360
11755         Misc       DS
11756         Misc     X360
11757    Adventure      PSP
11758     Platform      PSP
11759     Platform       GB
11760       Action      Wii
11761       Puzzle      GBA
11762      Shooter       PC
11763       Puzzle       DS
11764       Action      PS4
11765       Action      PS2
11766    Adventure       DS
11767    Adventure       XB
11768       Racing       XB
11769       Racing      SAT
11770       Action       PS
11771       Action     X360
11772     Platform       GB
11773         Misc       DS
11774     Platform       XB
11775 Role-Playing       DS
11776      Shooter      Wii
11777     Strategy       PC
11778     Strategy      PS2
11779         Misc       DS
11780       Sports       DS
11781     Fighting      PSP
11782 Role-Playing       DS
11783   Simulation      PS2
11784         Misc       DS
11785     Strategy      PS2
11786    Adventure       GC
11787 Role-Playing       PC
11788         Misc      GBA
11789     Strategy       XB
11790   Simulation       PC
11791       Sports     X360
11792    Adventure       PS
11793       Action      PSP
11794       Puzzle       DS
11795       Puzzle       PS
11796       Sports     SNES
11797 Role-Playing      PS4
11798    Adventure      PS2
11799       Puzzle       DS
11800       Racing       XB
11801       Action       DS
11802       Sports      PS3
11803     Platform       PS
11804      Shooter       PS
11805     Fighting      GBA
11806     Strategy       GC
11807         Misc      PS2
11808     Strategy       PC
11809   Simulation       DS
11810       Sports       DS
11811     Fighting     X360
11812     Strategy      PS2
11813       Action      PSP
11814         Misc      3DS
11815    Adventure       DS
11816 Role-Playing       PC
11817   Simulation      3DS
11818       Racing     X360
11819         Misc      GBA
11820     Platform       XB
11821     Fighting       GC
11822      Shooter       XB
11823       Sports      Wii
11824    Adventure      PS2
11825         Misc       XB
11826      Shooter       PS
11827    Adventure      PSP
11828     Platform      GBA
11829         Misc      PS2
11830    Adventure      PSP
11831       Puzzle       DS
11832       Sports      PSP
11833    Adventure       DS
11834       Racing       XB
11835       Puzzle       DS
11836 Role-Playing      PSP
11837   Simulation       DS
11838       Action     SNES
11839     Strategy      PS2
11840     Strategy      PSP
11841     Strategy       DS
11842      Shooter      PS2
11843         Misc       DS
11844       Action       DS
11845      Shooter       GC
11846      Shooter      3DS
11847         Misc      Wii
11848         Misc      3DS
11849       Action      PSP
11850   Simulation      PS3
11851       Racing       DS
11852     Fighting       DC
11853         Misc       DS
11854       Action      PSV
11855   Simulation       PC
11856     Platform      GBA
11857         Misc      PS3
11858       Racing      Wii
11859       Sports      GBA
11860       Action      3DS
11861       Puzzle       DS
11862       Action       XB
11863 Role-Playing      PSP
11864       Racing      PS2
11865       Racing      PS2
11866       Action      PS3
11867       Sports       PS
11868      Shooter      3DS
11869       Action       PS
11870       Sports       GC
11871         Misc       GC
11872         Misc      Wii
11873       Sports      N64
11874       Action      PS2
11875 Role-Playing     X360
11876       Action       DS
11877       Action      GBA
11878    Adventure      PS2
11879       Action       PC
11880       Racing      Wii
11881     Strategy      PSP
11882         Misc     X360
11883       Action     XOne
11884      Shooter       PC
11885       Action      PS2
11886         Misc       DS
11887         Misc       DS
11888 Role-Playing      PS4
11889     Strategy       DS
11890    Adventure       DS
11891       Sports      GBA
11892       Racing       DS
11893   Simulation      Wii
11894       Sports      Wii
11895 Role-Playing      3DS
11896       Action     X360
11897       Action       DS
11898         Misc       DS
11899    Adventure      PSP
11900   Simulation       PC
11901       Puzzle       DS
11902    Adventure       DS
11903       Racing      PS3
11904       Action       XB
11905     Strategy      PS2
11906    Adventure       XB
11907       Action       GB
11908 Role-Playing      PSV
11909       Racing       XB
11910     Fighting      PSP
11911    Adventure      GEN
11912       Puzzle       DS
11913   Simulation       DS
11914         Misc     X360
11915      Shooter       PC
11916      Shooter       PS
11917     Strategy       PS
11918       Sports     X360
11919 Role-Playing      PSP
11920    Adventure       DS
11921 Role-Playing      PSV
11922 Role-Playing      PSV
11923     Platform       DS
11924    Adventure      3DS
11925       Action      PS2
11926       Action       PS
11927       Sports      PS2
11928       Action       DS
11929       Puzzle      3DS
11930       Action     X360
11931       Sports      3DS
11932     Platform       XB
11933       Action      Wii
11934       Sports       DS
11935       Action       XB
11936       Action      PS2
11937         Misc      PSV
11938         Misc      Wii
11939     Platform       GC
11940    Adventure      N64
11941     Fighting      N64
11942       Sports      N64
11943       Sports     SNES
11944         Misc      GBA
11945       Racing      N64
11946     Strategy      N64
11947     Fighting      NES
11948         Misc       DS
11949      Shooter     X360
11950       Action       XB
11951    Adventure      PS2
11952       Sports       DS
11953       Action      PSP
11954       Sports       GC
11955     Strategy      PS3
11956 Role-Playing      PS3
11957         Misc      Wii
11958       Sports      PSP
11959     Platform       GC
11960       Sports     X360
11961 Role-Playing      PSP
11962         Misc       XB
11963    Adventure      GBA
11964         Misc     X360
11965 Role-Playing       PS
11966      Shooter       DS
11967    Adventure      PSP
11968       Action      PS2
11969     Platform      Wii
11970       Action       DS
11971       Sports      Wii
11972     Fighting      PSV
11973       Action       DS
11974       Action      PS2
11975 Role-Playing      PSV
11976    Adventure       DS
11977       Action      3DS
11978 Role-Playing      PSP
11979     Fighting      PS3
11980       Action      PSV
11981 Role-Playing       DS
11982       Sports       DS
11983      Shooter       PS
11984     Platform       GC
11985       Action     XOne
11986         Misc       DS
11987       Racing       PS
11988       Sports      Wii
11989         Misc       DS
11990       Action       GC
11991 Role-Playing      PS2
11992       Action     WiiU
11993       Sports       PC
11994      Shooter      Wii
11995 Role-Playing      PS3
11996   Simulation      PS2
11997       Racing      PS2
11998     Fighting      PS3
11999       Action      GBA
12000         Misc      PS2
12001         Misc      Wii
12002      Shooter      PS2
12003       Sports      Wii
12004     Strategy       DS
12005       Action       GC
12006     Platform       XB
12007       Action      3DS
12008       Action       PS
12009       Racing      Wii
12010   Simulation      PSP
12011    Adventure      PS2
12012       Action      GBA
12013      Shooter     X360
12014     Strategy       DS
12015   Simulation       DS
12016 Role-Playing       PC
12017       Action      PSP
12018   Simulation       PS
12019       Racing       DC
12020   Simulation       PC
12021 Role-Playing     SNES
12022       Action      GEN
12023   Simulation      Wii
12024     Fighting       GC
12025 Role-Playing       DS
12026       Puzzle      GBA
12027    Adventure      Wii
12028       Action      3DS
12029      Shooter      Wii
12030       Action       DS
12031    Adventure       PC
12032      Shooter       PS
12033       Action      PS2
12034       Action       DS
12035       Racing       PS
12036     Strategy       DS
12037 Role-Playing      PS3
12038       Action       DS
12039       Action      PSP
12040    Adventure       PS
12041    Adventure      PS4
12042      Shooter       DS
12043     Fighting       NG
12044       Action       PS
12045     Fighting      PS2
12046    Adventure      PS2
12047 Role-Playing      PS2
12048 Role-Playing       PS
12049       Action       DS
12050       Sports       GC
12051         Misc       GC
12052   Simulation       PC
12053     Platform      3DS
12054       Action      PS2
12055     Platform      Wii
12056    Adventure       PC
12057       Sports      PSV
12058       Action      PS4
12059     Fighting      PS3
12060    Adventure       DS
12061    Adventure      PS4
12062         Misc      PSP
12063       Action      SAT
12064       Action       DS
12065    Adventure       DS
12066         Misc       DS
12067       Sports       GB
12068         Misc       DS
12069       Puzzle      GBA
12070      Shooter      PS3
12071       Sports       PS
12072     Fighting     X360
12073       Action       GC
12074         Misc      SAT
12075       Action      3DS
12076       Action     SNES
12077     Strategy       GC
12078         Misc       DS
12079 Role-Playing       DS
12080       Action      PSV
12081 Role-Playing      PSP
12082         Misc     X360
12083   Simulation       PS
12084       Sports      PSP
12085       Action       PS
12086     Platform       DS
12087       Puzzle       DS
12088       Sports       DS
12089    Adventure      PS2
12090       Sports       GC
12091 Role-Playing       DS
12092       Action       DS
12093      Shooter       PS
12094       Action      PS2
12095 Role-Playing      3DS
12096       Action       DS
12097       Sports      PS2
12098       Action       GC
12099       Action      PS2
12100       Action      Wii
12101         Misc       DS
12102     Fighting      GBA
12103     Fighting      PS2
12104       Sports      Wii
12105   Simulation       XB
12106       Sports      GBA
12107    Adventure      Wii
12108       Sports      PS2
12109      Shooter      PS3
12110     Strategy      PS2
12111         Misc       DS
12112       Racing       XB
12113 Role-Playing      PSV
12114    Adventure      GBA
12115 Role-Playing      PSP
12116   Simulation      PS3
12117       Action      GBA
12118         Misc       DS
12119    Adventure      PS3
12120       Sports      Wii
12121     Fighting     X360
12122       Racing       XB
12123       Action       PC
12124       Action      GBA
12125         Misc      GBA
12126       Action       DS
12127         Misc      Wii
12128     Strategy       PC
12129         Misc       PS
12130       Puzzle       DS
12131       Racing       PS
12132       Sports      PS3
12133         Misc      Wii
12134       Puzzle      PSP
12135       Action       DS
12136     Fighting       PS
12137   Simulation      Wii
12138     Strategy      PS3
12139       Sports       PS
12140         Misc      PSP
12141       Action      PS3
12142         Misc      Wii
12143     Fighting      PS2
12144   Simulation     X360
12145       Action       PS
12146         Misc      GBA
12147    Adventure      PS2
12148     Platform      PS3
12149   Simulation      PS2
12150 Role-Playing       DS
12151       Action      PS4
12152       Sports       GC
12153     Strategy       GC
12154       Action     XOne
12155       Action       PC
12156    Adventure     WiiU
12157 Role-Playing       PC
12158    Adventure      PS2
12159 Role-Playing      PS3
12160       Racing     X360
12161 Role-Playing      PS2
12162         Misc       XB
12163       Action       DS
12164    Adventure      PS2
12165       Puzzle      PSP
12166     Platform       PS
12167     Strategy      3DS
12168       Racing      PS3
12169 Role-Playing      PS2
12170         Misc       DS
12171       Action      3DS
12172    Adventure      3DS
12173         Misc     SNES
12174    Adventure       DS
12175      Shooter      GBA
12176      Shooter       PS
12177         Misc       DS
12178       Action      GBA
12179     Strategy       PC
12180     Strategy       XB
12181   Simulation     X360
12182      Shooter      GBA
12183     Platform       DS
12184         Misc       DS
12185     Strategy      PS2
12186       Action      GEN
12187       Action     X360
12188 Role-Playing      PSV
12189         Misc     X360
12190       Sports      PS3
12191       Action       DS
12192       Sports       DS
12193       Racing       PS
12194       Sports       XB
12195         Misc      3DS
12196    Adventure      PS4
12197       Action       PC
12198 Role-Playing      PSV
12199       Racing      GBA
12200    Adventure       DS
12201     Strategy       PS
12202 Role-Playing     X360
12203     Fighting      PSP
12204   Simulation       XB
12205       Racing       XB
12206 Role-Playing      PS2
12207     Fighting       GC
12208     Strategy      PSV
12209   Simulation      GBA
12210       Action       XB
12211    Adventure       PS
12212         Misc     X360
12213         Misc       XB
12214     Strategy       PC
12215     Strategy       DS
12216   Simulation       DS
12217       Action      3DS
12218    Adventure       XB
12219    Adventure       DC
12220    Adventure       DS
12221      Shooter       DS
12222       Sports      GBA
12223     Fighting      Wii
12224    Adventure       DC
12225       Action      PS2
12226         Misc       DS
12227       Action       XB
12228       Racing       PC
12229       Sports      Wii
12230         Misc       DS
12231   Simulation      PS2
12232         Misc     WiiU
12233 Role-Playing      PSV
12234      Shooter      PSP
12235       Action      PSV
12236       Sports       GC
12237       Action      GBA
12238       Action      PSV
12239       Action     WiiU
12240       Sports       XB
12241       Action      PSP
12242         Misc       DS
12243       Action       DS
12244         Misc     SNES
12245       Racing      PS2
12246       Action       DS
12247       Sports      Wii
12248         Misc      PSP
12249     Fighting      Wii
12250       Action     XOne
12251     Fighting      PSP
12252     Fighting      PSP
12253    Adventure       DS
12254       Racing       PS
12255       Puzzle      3DS
12256     Fighting      Wii
12257     Platform       DS
12258       Action      Wii
12259         Misc       DS
12260         Misc      PS2
12261         Misc      Wii
12262   Simulation       DS
12263      Shooter       DS
12264       Puzzle      GBA
12265      Shooter      PSP
12266 Role-Playing      PS2
12267       Action      3DS
12268     Fighting     X360
12269       Sports      PS2
12270 Role-Playing      PS2
12271     Platform      GBA
12272      Shooter      PS2
12273       Racing       XB
12274         Misc      PSV
12275       Sports      Wii
12276       Puzzle       DS
12277 Role-Playing      PSP
12278       Action       GC
12279   Simulation      SAT
12280 Role-Playing      PSP
12281     Platform       DS
12282     Fighting      Wii
12283       Racing       GC
12284       Sports       DS
12285       Action      GBA
12286    Adventure      PS3
12287   Simulation      PS2
12288       Action       DS
12289    Adventure       DS
12290     Platform       PC
12291         Misc      GBA
12292 Role-Playing      PSP
12293 Role-Playing      PS2
12294       Racing      PS2
12295       Action      GBA
12296   Simulation       DS
12297       Puzzle       PS
12298         Misc       GC
12299     Platform      PSP
12300      Shooter      PS3
12301     Strategy       DS
12302       Sports      PSV
12303      Shooter      SAT
12304         Misc      PS3
12305       Sports       XB
12306       Action      3DS
12307   Simulation       DS
12308      Shooter       XB
12309 Role-Playing      PS3
12310      Shooter       PS
12311      Shooter       PS
12312       Action      3DS
12313       Racing      PS4
12314       Sports      Wii
12315         Misc       DS
12316         Misc       DS
12317     Fighting      PSP
12318   Simulation      Wii
12319     Strategy       DS
12320     Platform       DS
12321     Fighting     XOne
12322       Action     XOne
12323       Sports       PC
12324       Puzzle       DS
12325    Adventure       DS
12326 Role-Playing      PSP
12327    Adventure      PSV
12328      Shooter       DS
12329       Action      PS2
12330       Action      GBA
12331   Simulation      GBA
12332 Role-Playing      PSP
12333       Action     X360
12334     Fighting      PSP
12335       Puzzle       DS
12336       Action      PSV
12337       Puzzle      Wii
12338       Action      PS3
12339    Adventure      PS2
12340     Fighting      Wii
12341     Platform      GBA
12342       Action      3DS
12343       Action       PS
12344         Misc      PSP
12345   Simulation     SNES
12346   Simulation       DS
12347       Action     X360
12348       Racing      Wii
12349      Shooter      Wii
12350       Action       PC
12351    Adventure      PS3
12352       Action      PS4
12353       Sports       GC
12354     Strategy       PC
12355       Action      PSV
12356 Role-Playing      PS2
12357    Adventure      Wii
12358   Simulation       PS
12359         Misc       PS
12360       Sports       PS
12361         Misc      Wii
12362       Action       PC
12363 Role-Playing       DS
12364     Strategy       XB
12365         Misc       DS
12366      Shooter     X360
12367   Simulation      3DS
12368         Misc       XB
12369         Misc      GBA
12370         Misc      PS2
12371   Simulation      PS2
12372       Racing      PS2
12373 Role-Playing       DS
12374       Puzzle       DS
12375         Misc      PSP
12376       Puzzle       DS
12377       Action       PC
12378       Action     WiiU
12379      Shooter      PS2
12380    Adventure     X360
12381    Adventure      3DS
12382 Role-Playing       PC
12383       Racing     X360
12384 Role-Playing      PSV
12385 Role-Playing      PS4
12386     Fighting      PS2
12387       Action       PC
12388    Adventure      PS2
12389         Misc      PS2
12390    Adventure      PSP
12391     Fighting       GC
12392       Action     WiiU
12393       Sports       XB
12394       Sports       PS
12395       Action      PS2
12396       Sports      PS2
12397       Racing     X360
12398      Shooter      PS4
12399       Action       DS
12400       Action      GBA
12401       Puzzle      GBA
12402       Racing      Wii
12403     Fighting      Wii
12404       Action      PS3
12405    Adventure      SAT
12406    Adventure      PS2
12407       Action      3DS
12408       Action       XB
12409   Simulation       DS
12410         Misc      PSP
12411       Puzzle       DS
12412     Strategy       DS
12413 Role-Playing      PS4
12414       Action       DS
12415       Action      PS3
12416       Racing      Wii
12417       Action      PS2
12418   Simulation       DS
12419       Action      3DS
12420   Simulation       DS
12421    Adventure       XB
12422       Action       XB
12423       Racing       PC
12424     Strategy      PS3
12425    Adventure       PC
12426       Action      PS2
12427         Misc       DS
12428   Simulation       DS
12429       Racing       DC
12430       Sports      GBA
12431       Racing     X360
12432       Puzzle       DS
12433 Role-Playing      Wii
12434     Platform       GC
12435       Action      Wii
12436       Action      PSP
12437 Role-Playing       DS
12438       Action     XOne
12439       Action       GC
12440    Adventure      Wii
12441 Role-Playing       PC
12442      Shooter       PC
12443       Sports       GC
12444       Action      PSV
12445 Role-Playing       DS
12446       Action      PS2
12447    Adventure      Wii
12448      Shooter       XB
12449       Puzzle       DS
12450      Shooter       PC
12451      Shooter       DS
12452       Action      PSP
12453       Racing      Wii
12454 Role-Playing      PSV
12455 Role-Playing      PS4
12456      Shooter       XB
12457    Adventure      N64
12458       Action     XOne
12459     Fighting      3DS
12460     Fighting     X360
12461 Role-Playing      PSV
12462       Racing     X360
12463       Sports     X360
12464       Action       PC
12465         Misc      PS2
12466       Action      PS3
12467         Misc       DS
12468         Misc       DS
12469       Sports       PS
12470   Simulation       DS
12471   Simulation       DS
12472    Adventure      PS2
12473 Role-Playing       PC
12474       Sports      N64
12475       Puzzle      N64
12476      Shooter      N64
12477       Racing      N64
12478       Sports      N64
12479       Sports      N64
12480       Sports      N64
12481       Racing      N64
12482       Racing      N64
12483       Racing      N64
12484    Adventure      Wii
12485         Misc      N64
12486     Fighting      SAT
12487       Puzzle       GC
12488 Role-Playing      PSV
12489      Shooter      PSP
12490    Adventure       DS
12491       Action      3DS
12492      Shooter       PC
12493       Racing       XB
12494       Racing      GBA
12495       Action      3DS
12496     Platform       DS
12497       Puzzle       DS
12498         Misc       DS
12499    Adventure       PC
12500       Sports       DS
12501       Puzzle      Wii
12502       Action       PC
12503       Sports       DS
12504      Shooter      PS2
12505       Sports      PSP
12506       Racing       PS
12507       Sports      PSP
12508       Sports       DS
12509       Sports      SAT
12510 Role-Playing      3DS
12511       Sports      PS3
12512     Fighting       DS
12513      Shooter      PS2
12514      Shooter      PS2
12515       Puzzle      Wii
12516       Sports      GBA
12517     Fighting      GBA
12518     Fighting      PSP
12519         Misc       DS
12520 Role-Playing      PSP
12521   Simulation       DS
12522       Racing      GBA
12523     Strategy      3DS
12524       Action     WiiU
12525         Misc      PS2
12526       Sports      PSP
12527     Strategy       DS
12528     Platform      GBA
12529       Sports      PS2
12530       Action      PSP
12531         Misc       XB
12532 Role-Playing      SCD
12533       Sports      PS2
12534         Misc      PSP
12535       Sports       PS
12536     Fighting      PS2
12537    Adventure      PSV
12538       Puzzle       PS
12539       Action      GBA
12540    Adventure      GBA
12541       Action       GC
12542    Adventure      3DS
12543    Adventure      SAT
12544       Sports       GC
12545   Simulation      PSP
12546     Strategy       PC
12547       Action      PS2
12548       Sports       XB
12549 Role-Playing      3DS
12550      Shooter      3DS
12551 Role-Playing      3DS
12552 Role-Playing      3DS
12553     Strategy       XB
12554       Action       DS
12555       Racing     XOne
12556 Role-Playing      PSP
12557      Shooter      PS2
12558    Adventure       DS
12559 Role-Playing       PC
12560         Misc      Wii
12561       Action     X360
12562       Action       DS
12563       Action      PS2
12564       Sports      PS2
12565       Action     X360
12566         Misc       DS
12567    Adventure      PS4
12568       Sports       PC
12569       Sports      GBA
12570     Strategy       PC
12571       Action       XB
12572       Action      PSP
12573      Shooter     X360
12574       Action       DS
12575       Puzzle       DS
12576       Sports       DS
12577     Strategy       DS
12578       Racing      PS2
12579         Misc       DS
12580     Strategy       DS
12581       Action       PS
12582   Simulation       DS
12583    Adventure      3DO
12584       Action      PSP
12585     Fighting       PS
12586       Puzzle      NES
12587         Misc       DS
12588       Action      PS3
12589      Shooter     X360
12590     Fighting      PS3
12591       Racing      GBA
12592      Shooter      PS2
12593   Simulation       XB
12594       Racing      PS3
12595         Misc      PS2
12596       Action     XOne
12597   Simulation      SAT
12598      Shooter     X360
12599 Role-Playing      PSP
12600     Platform     SNES
12601       Racing       PC
12602       Action      PSP
12603 Role-Playing      PSV
12604     Strategy       PC
12605       Action       PS
12606       Puzzle       DS
12607 Role-Playing       DS
12608       Action     X360
12609    Adventure       XB
12610     Fighting      PSP
12611         Misc      PS2
12612     Fighting       DS
12613    Adventure      Wii
12614       Action      Wii
12615       Puzzle       DS
12616         Misc       DS
12617 Role-Playing       DS
12618    Adventure      PSP
12619       Action       XB
12620      Shooter      PS2
12621      Shooter      PS2
12622         Misc       DS
12623       Action       GB
12624       Puzzle      Wii
12625       Action       GC
12626       Puzzle       DS
12627     Fighting       PS
12628       Sports      PSP
12629       Action       XB
12630   Simulation       DS
12631       Sports       DS
12632 Role-Playing      PSV
12633       Action     X360
12634       Action      PS4
12635       Action     X360
12636 Role-Playing      PS2
12637     Platform      SAT
12638     Platform      Wii
12639     Fighting       PC
12640       Action     WiiU
12641       Action       DS
12642       Action      PS3
12643       Sports       PS
12644 Role-Playing      GBA
12645       Action       PS
12646     Fighting     SNES
12647       Sports      PS2
12648       Sports      PS4
12649       Action      PSP
12650       Action      GBA
12651         Misc      PSP
12652       Sports      PS2
12653       Sports       DS
12654       Action       XB
12655       Action       GC
12656 Role-Playing      PSP
12657     Fighting       DS
12658    Adventure       DS
12659    Adventure     X360
12660     Fighting      Wii
12661      Shooter       PC
12662      Shooter       DS
12663         Misc       DS
12664         Misc       DS
12665       Action      PSP
12666     Fighting      PS2
12667       Action      PS2
12668      Shooter       PS
12669       Action      PS2
12670   Simulation     X360
12671       Action       DS
12672     Fighting       PS
12673       Sports       GC
12674 Role-Playing      PS2
12675       Sports      PS4
12676       Sports       DS
12677 Role-Playing       GC
12678       Sports       GC
12679       Action       GC
12680       Action      PS4
12681 Role-Playing      PSP
12682    Adventure      PS3
12683       Action       DS
12684 Role-Playing       DS
12685       Sports      PS3
12686   Simulation       PC
12687      Shooter      Wii
12688 Role-Playing      PSP
12689       Sports      PSV
12690     Strategy      Wii
12691    Adventure       PS
12692         Misc      PS2
12693       Sports      Wii
12694       Action      PSP
12695 Role-Playing      PS3
12696       Racing       GC
12697       Racing      PSV
12698         Misc      PS2
12699       Racing      PS2
12700     Platform       XB
12701       Action       PC
12702 Role-Playing      3DS
12703         Misc      GBA
12704       Action       DS
12705    Adventure      PSV
12706       Action       PC
12707       Action      PSP
12708       Action      PS2
12709     Platform     SNES
12710    Adventure      SAT
12711         Misc      PSV
12712    Adventure      PSP
12713       Racing       PS
12714       Puzzle      Wii
12715    Adventure      PS2
12716       Puzzle       DS
12717   Simulation       GC
12718    Adventure       DS
12719       Sports       DS
12720     Strategy      PS2
12721         Misc       DS
12722       Racing      GBA
12723   Simulation       DS
12724       Sports      PS2
12725       Sports       DS
12726    Adventure      PS2
12727       Sports     X360
12728    Adventure       PS
12729       Racing       PS
12730       Sports       XB
12731 Role-Playing      PSV
12732       Action      GBA
12733     Strategy      3DS
12734       Sports       DS
12735       Sports      PS4
12736 Role-Playing      3DS
12737       Puzzle      GBA
12738   Simulation       DS
12739       Action      PSV
12740       Racing     X360
12741     Fighting       NG
12742     Strategy      PS4
12743         Misc      PS2
12744   Simulation       DS
12745       Sports      PS2
12746       Action       PC
12747      Shooter      SAT
12748   Simulation      PSP
12749         Misc     X360
12750      Shooter       GC
12751      Shooter       PS
12752       Sports       PC
12753       Action     X360
12754         Misc      PS4
12755     Fighting       PS
12756 Role-Playing       DS
12757       Sports      GBA
12758     Platform      SAT
12759       Racing       XB
12760       Racing      PS2
12761       Sports      3DS
12762       Racing       PS
12763     Platform       PC
12764 Role-Playing       PC
12765     Strategy       GC
12766     Platform       DS
12767      Shooter       XB
12768       Sports       DC
12769       Action      PS2
12770 Role-Playing       DS
12771 Role-Playing      PSP
12772         Misc      PSV
12773      Shooter       DS
12774   Simulation       PC
12775       Racing      PS2
12776 Role-Playing       PC
12777       Puzzle      Wii
12778    Adventure      PSP
12779     Strategy      SAT
12780     Strategy       DS
12781       Action     XOne
12782         Misc       DS
12783     Strategy      GBA
12784 Role-Playing      GBA
12785         Misc      Wii
12786       Action      PS2
12787       Racing       XB
12788     Strategy      GBA
12789       Racing       PC
12790       Action       XB
12791         Misc       DS
12792       Action       PC
12793       Puzzle      PS2
12794       Sports       PS
12795         Misc       DS
12796         Misc       DS
12797       Sports      Wii
12798       Puzzle       DS
12799       Sports       PS
12800       Action      PSP
12801 Role-Playing       GC
12802       Action      Wii
12803       Sports      PSP
12804     Strategy       DS
12805 Role-Playing      PS2
12806       Sports       GC
12807       Action       DS
12808    Adventure      PSV
12809     Strategy       PC
12810   Simulation      GBA
12811         Misc       DS
12812       Action      PS2
12813    Adventure       PC
12814       Action      Wii
12815       Sports       XB
12816      Shooter      PS3
12817    Adventure      PS2
12818     Strategy      Wii
12819       Action       GC
12820    Adventure       DS
12821       Action      PS4
12822       Action      PSP
12823   Simulation      PSP
12824       Racing       XB
12825      Shooter       XB
12826       Puzzle      PSP
12827      Shooter       PC
12828       Action      PSP
12829     Strategy      PSP
12830       Sports       PS
12831       Sports      PS2
12832       Action       XB
12833       Action      PSV
12834       Puzzle      GBA
12835       Sports      GBA
12836   Simulation      PS2
12837    Adventure       PC
12838       Action     XOne
12839       Puzzle       PC
12840       Action      PSV
12841       Action      3DS
12842   Simulation       DS
12843    Adventure      PS3
12844     Strategy      Wii
12845       Action       PC
12846         Misc      PSP
12847     Fighting      PS2
12848      Shooter      PS2
12849       Sports       XB
12850    Adventure      3DS
12851 Role-Playing      PSP
12852 Role-Playing      GBA
12853       Sports       XB
12854   Simulation       PC
12855         Misc       DS
12856       Action      PSP
12857     Platform       GC
12858     Fighting       PS
12859   Simulation       DS
12860 Role-Playing      PSV
12861 Role-Playing       GC
12862       Racing      PS3
12863 Role-Playing      PSV
12864 Role-Playing      PSV
12865     Platform       XB
12866    Adventure     SNES
12867         Misc      Wii
12868       Puzzle      PS2
12869     Platform       DS
12870     Platform      PS2
12871       Puzzle      Wii
12872       Sports      Wii
12873   Simulation       PC
12874     Strategy      PSV
12875       Sports       XB
12876         Misc      Wii
12877       Sports      PS2
12878       Action      3DS
12879       Racing       PS
12880 Role-Playing       DS
12881     Platform      PSP
12882       Sports       XB
12883     Platform      PS4
12884         Misc       DS
12885 Role-Playing     SNES
12886       Action      PS2
12887       Sports      PS4
12888       Action       DS
12889       Action       DS
12890     Fighting       PS
12891       Action       DS
12892       Racing      PS3
12893         Misc       DS
12894      Shooter       PC
12895 Role-Playing       DS
12896     Platform       PS
12897       Action      3DS
12898       Action      Wii
12899       Action       XB
12900       Sports       PS
12901     Platform      GEN
12902      Shooter      PS3
12903 Role-Playing      PS4
12904       Puzzle       DS
12905       Puzzle      Wii
12906         Misc       DS
12907     Strategy       PC
12908 Role-Playing      PSP
12909     Platform       XB
12910 Role-Playing       DS
12911 Role-Playing      PS2
12912    Adventure       XB
12913       Sports      Wii
12914         Misc     SNES
12915    Adventure       DS
12916 Role-Playing      PS2
12917       Action     XOne
12918     Platform     WiiU
12919   Simulation       DS
12920         Misc       DS
12921       Sports       GC
12922       Sports      PS4
12923       Sports     X360
12924     Fighting      PSP
12925      Shooter      Wii
12926       Racing       PC
12927         Misc      SCD
12928       Action      PSV
12929     Platform       GC
12930       Action       DS
12931       Action      PS2
12932   Simulation     X360
12933       Action       PC
12934       Racing      PS2
12935   Simulation       DS
12936         Misc      PS3
12937       Sports      PS2
12938       Action      PSP
12939         Misc      Wii
12940   Simulation       DS
12941       Action       XB
12942       Action      PS2
12943     Platform       DS
12944     Fighting     X360
12945     Platform       GC
12946       Action       PC
12947       Puzzle      Wii
12948 Role-Playing       XB
12949    Adventure      PSP
12950       Racing       XB
12951       Action       DS
12952       Puzzle       XB
12953       Racing       XB
12954       Action      PS3
12955    Adventure     X360
12956     Platform      GBA
12957      Shooter      PS4
12958         Misc       GC
12959       Racing      PS2
12960       Action     WiiU
12961    Adventure      Wii
12962       Action       PS
12963       Sports      Wii
12964     Fighting       PC
12965     Fighting       DS
12966   Simulation       PC
12967    Adventure      PS2
12968    Adventure       DS
12969 Role-Playing       DS
12970    Adventure      PSV
12971       Action     XOne
12972     Fighting      PSP
12973 Role-Playing       DS
12974     Fighting       DS
12975       Sports       DS
12976 Role-Playing     X360
12977 Role-Playing       PC
12978      Shooter       PC
12979       Sports       DS
12980 Role-Playing     SNES
12981         Misc       PC
12982       Puzzle       DS
12983 Role-Playing     XOne
12984      Shooter     X360
12985    Adventure      PSP
12986       Puzzle       DS
12987      Shooter     X360
12988       Sports      GBA
12989 Role-Playing      GBA
12990       Sports      PSP
12991   Simulation       DS
12992   Simulation       DS
12993       Racing       PS
12994    Adventure      PS4
12995     Fighting      PS2
12996       Action     WiiU
12997   Simulation       DS
12998 Role-Playing       DS
12999       Action       DS
13000    Adventure       DS
13001         Misc      PSP
13002       Sports      GBA
13003   Simulation      PSP
13004       Racing      PS2
13005    Adventure      PS2
13006   Simulation       DS
13007         Misc       GC
13008      Shooter       PC
13009       Action      Wii
13010      Shooter       DS
13011       Sports       DS
13012 Role-Playing       DS
13013 Role-Playing       DS
13014     Strategy       DS
13015      Shooter      PSP
13016    Adventure      Wii
13017    Adventure       PS
13018   Simulation       XB
13019       Sports      PS2
13020       Action       PS
13021    Adventure       DS
13022         Misc      PS3
13023       Racing       PS
13024      Shooter       PS
13025      Shooter       DC
13026         Misc      PS4
13027    Adventure      Wii
13028    Adventure       DS
13029       Action      PSV
13030     Platform      PSP
13031       Sports     XOne
13032       Action      PSP
13033         Misc      Wii
13034       Puzzle       DS
13035       Action       DS
13036         Misc       DS
13037         Misc       GC
13038       Racing       GC
13039       Racing       PS
13040         Misc       DS
13041       Sports       DS
13042       Action       DS
13043       Sports      N64
13044       Action      3DS
13045 Role-Playing      PSV
13046    Adventure       GC
13047      Shooter       PS
13048         Misc      SAT
13049       Puzzle      GBA
13050    Adventure      PSP
13051       Action      PS2
13052      Shooter     WiiU
13053     Fighting     X360
13054     Fighting       GC
13055       Puzzle       PC
13056     Fighting      PS2
13057       Racing       DS
13058       Racing       DS
13059    Adventure      PS4
13060       Puzzle       DS
13061       Action      GBA
13062      Shooter      PS2
13063         Misc      PS3
13064       Action       XB
13065     Strategy      Wii
13066       Sports       GC
13067     Fighting      N64
13068     Fighting      N64
13069 Role-Playing      N64
13070     Platform      N64
13071       Racing      PS2
13072     Platform      N64
13073 Role-Playing       DS
13074       Puzzle       DS
13075       Sports      N64
13076         Misc       DS
13077       Sports      PS3
13078         Misc      PS2
13079 Role-Playing       XB
13080         Misc      PSP
13081       Sports     SNES
13082    Adventure       DS
13083       Action       PS
13084       Sports      PS3
13085       Racing      PS3
13086       Action       DS
13087       Action      GBA
13088         Misc     X360
13089 Role-Playing      PSV
13090     Fighting       DS
13091       Sports       GC
13092 Role-Playing       DS
13093    Adventure       DS
13094       Puzzle      GBA
13095       Action      PS4
13096       Racing       DS
13097    Adventure      PSP
13098         Misc     SNES
13099       Action      PSV
13100    Adventure      PSP
13101      Shooter       PC
13102       Racing      Wii
13103    Adventure       PS
13104       Puzzle      GBA
13105       Sports     SNES
13106    Adventure      PS2
13107     Platform       GC
13108    Adventure       PC
13109       Sports      PSP
13110       Action      3DS
13111       Racing     X360
13112    Adventure      PSP
13113       Action      GBA
13114    Adventure      PS2
13115 Role-Playing      PSP
13116     Fighting      PS2
13117     Strategy       PC
13118         Misc       DS
13119    Adventure       DS
13120     Platform       DS
13121     Platform      PS2
13122   Simulation      Wii
13123   Simulation       PC
13124 Role-Playing      3DS
13125 Role-Playing      PSP
13126       Puzzle      PSP
13127       Puzzle      SAT
13128 Role-Playing      PS4
13129      Shooter       PS
13130       Action      3DS
13131       Action       GC
13132         Misc       DS
13133         Misc      Wii
13134   Simulation      PS2
13135 Role-Playing      PS3
13136       Racing       PC
13137      Shooter       PC
13138       Racing      PS2
13139     Platform      PS2
13140       Action     XOne
13141    Adventure      PS2
13142         Misc      Wii
13143         Misc      PS4
13144      Shooter       XB
13145         Misc       DS
13146   Simulation      PS2
13147       Action      3DS
13148      Shooter      PS4
13149     Platform      PSP
13150       Action      GBA
13151         Misc       DS
13152       Puzzle       DS
13153 Role-Playing      PSP
13154       Sports       GC
13155         Misc      GBA
13156     Strategy       PC
13157       Sports      PS2
13158         Misc      GBA
13159       Sports       PS
13160    Adventure      PS3
13161    Adventure       DS
13162         Misc       PS
13163     Strategy      Wii
13164   Simulation       DS
13165       Puzzle      GBA
13166       Action      PS4
13167       Puzzle      GBA
13168       Racing      PS2
13169    Adventure       DS
13170      Shooter      SAT
13171       Sports       DC
13172         Misc     SNES
13173         Misc       GC
13174      Shooter     SNES
13175      Shooter       PC
13176       Sports      PS2
13177     Platform       PS
13178      Shooter      GBA
13179    Adventure      PS2
13180     Platform       DS
13181      Shooter       PC
13182       Racing      PS4
13183       Action       DS
13184 Role-Playing      PS2
13185    Adventure      SAT
13186 Role-Playing      PS4
13187       Sports      PS2
13188       Action      Wii
13189       Action      GBA
13190 Role-Playing      PS2
13191     Strategy      PS2
13192         Misc       DS
13193      Shooter      PS3
13194     Fighting       DS
13195       Sports     X360
13196     Fighting      SAT
13197       Sports     SNES
13198     Fighting       DC
13199       Action       XB
13200    Adventure       DS
13201       Sports       XB
13202     Strategy       PC
13203         Misc       XB
13204       Racing      GBA
13205         Misc      Wii
13206     Platform       PS
13207       Action      PSP
13208   Simulation       PC
13209    Adventure       DS
13210 Role-Playing      PS2
13211       Puzzle     SNES
13212       Action       PC
13213       Sports      GBA
13214       Racing       GC
13215     Platform      PSP
13216       Sports      PS2
13217       Action       XB
13218       Sports       GC
13219     Strategy     X360
13220       Action       PC
13221       Racing       PC
13222       Racing       XB
13223 Role-Playing      PSP
13224       Puzzle       PS
13225     Strategy       PS
13226       Sports       DS
13227         Misc     X360
13228    Adventure      3DS
13229    Adventure      PS3
13230       Racing       XB
13231         Misc      PSP
13232         Misc      PS2
13233       Racing      PSP
13234       Sports       PS
13235       Sports       GC
13236    Adventure      PSP
13237       Action       DS
13238 Role-Playing       GC
13239       Sports      Wii
13240       Action     X360
13241         Misc       DS
13242     Strategy       PC
13243     Strategy       DS
13244       Action      PS3
13245      Shooter      PS3
13246     Strategy       PC
13247 Role-Playing      PS2
13248    Adventure       DS
13249       Sports      GBA
13250       Action       DS
13251     Strategy       PC
13252       Action      3DS
13253       Sports      PS2
13254     Fighting      GBA
13255       Racing      GBA
13256         Misc      PSP
13257     Fighting       XB
13258 Role-Playing      GEN
13259      Shooter       XB
13260    Adventure      PS3
13261    Adventure      Wii
13262       Racing       PC
13263       Puzzle       DS
13264       Racing      PSV
13265    Adventure      PS3
13266     Strategy       PS
13267    Adventure      PSP
13268     Platform       GC
13269       Action      PS2
13270    Adventure       DS
13271    Adventure      PSP
13272   Simulation       DS
13273       Sports      PSP
13274      Shooter       XB
13275      Shooter       PC
13276     Platform      Wii
13277 Role-Playing       XB
13278      Shooter       PS
13279       Action      PS3
13280 Role-Playing       PS
13281       Puzzle       DS
13282       Sports      PSP
13283       Racing     X360
13284   Simulation      Wii
13285       Action       XB
13286    Adventure      PSV
13287 Role-Playing       DS
13288       Action      PS3
13289     Strategy      Wii
13290   Simulation       PC
13291       Sports      PS3
13292      Shooter       PS
13293       Action       DS
13294    Adventure       PS
13295       Racing      Wii
13296 Role-Playing      PSP
13297     Fighting       GC
13298       Sports      Wii
13299       Sports     XOne
13300       Sports       PC
13301       Action       PC
13302         Misc      Wii
13303      Shooter       GC
13304 Role-Playing      PS3
13305     Strategy       XB
13306       Puzzle      PSV
13307   Simulation       PC
13308      Shooter      N64
13309   Simulation      Wii
13310       Sports       PC
13311       Puzzle      Wii
13312         Misc      PS2
13313         Misc      PSP
13314       Puzzle       GC
13315   Simulation       DS
13316       Puzzle       DS
13317    Adventure      PSV
13318         Misc      PSP
13319         Misc     X360
13320      Shooter     X360
13321     Platform       DS
13322    Adventure      PSV
13323         Misc       XB
13324       Racing       PS
13325      Shooter      Wii
13326      Shooter      3DS
13327       Sports     X360
13328     Strategy     XOne
13329       Action     X360
13330 Role-Playing      3DS
13331      Shooter     X360
13332       Racing       GC
13333       Racing       GC
13334       Action      PSV
13335       Puzzle       DS
13336       Action      PS2
13337       Sports       XB
13338       Action       DS
13339     Platform      GBA
13340    Adventure      3DS
13341       Sports      Wii
13342       Sports     X360
13343       Action      PSP
13344    Adventure       DS
13345     Strategy       PC
13346    Adventure      PSP
13347         Misc      Wii
13348       Sports       PC
13349 Role-Playing      PSV
13350    Adventure       PS
13351         Misc      PS3
13352       Racing      PS4
13353   Simulation      Wii
13354   Simulation       PC
13355 Role-Playing      PSP
13356         Misc       PS
13357       Action       DS
13358     Strategy       XB
13359    Adventure       DS
13360       Puzzle       DS
13361     Fighting      SAT
13362         Misc     X360
13363       Puzzle       DS
13364     Fighting      PSP
13365       Action      GBA
13366       Action      PSP
13367       Sports       DS
13368       Action      PS3
13369         Misc       DS
13370         Misc       PC
13371         Misc       XB
13372       Puzzle       DS
13373       Puzzle       PS
13374       Sports      PS2
13375      Shooter       XB
13376       Sports       DS
13377         Misc       DS
13378       Racing       DS
13379    Adventure      PSV
13380     Platform       XB
13381     Strategy       PC
13382       Sports      Wii
13383      Shooter       PC
13384   Simulation       DS
13385         Misc      3DS
13386       Racing      N64
13387   Simulation       PC
13388         Misc      GBA
13389         Misc      3DS
13390       Sports       PS
13391    Adventure      PSV
13392      Shooter     XOne
13393     Platform       DS
13394      Shooter       XB
13395     Platform       DS
13396    Adventure       DS
13397 Role-Playing       DS
13398      Shooter       GC
13399       Action      PS4
13400       Racing      PS2
13401 Role-Playing      PSV
13402       Action      Wii
13403       Racing       DS
13404         Misc      SCD
13405       Puzzle       PS
13406    Adventure       PC
13407   Simulation       DS
13408       Action       DS
13409 Role-Playing      GBA
13410   Simulation       PS
13411       Racing     X360
13412     Fighting      PS2
13413         Misc       DS
13414     Fighting      PS2
13415       Racing      PSP
13416       Racing      PS4
13417     Platform      Wii
13418    Adventure       DS
13419       Sports      PSP
13420         Misc       DS
13421 Role-Playing      PS2
13422         Misc      Wii
13423   Simulation       DS
13424       Sports      PS2
13425    Adventure      PSP
13426         Misc      SAT
13427     Fighting      PS2
13428         Misc       DS
13429         Misc       DS
13430       Action      3DS
13431         Misc      GBA
13432    Adventure       DS
13433       Action       PC
13434     Platform       GC
13435       Action      PSV
13436       Action       PS
13437       Action       DS
13438      Shooter       XB
13439       Action       DS
13440       Action       DS
13441       Puzzle       DS
13442       Sports     X360
13443       Action       PS
13444     Strategy       DS
13445   Simulation       DS
13446         Misc       DS
13447         Misc       DS
13448     Strategy       PC
13449 Role-Playing      GBA
13450    Adventure       PC
13451     Strategy       PS
13452   Simulation      3DS
13453       Puzzle       PC
13454         Misc       PS
13455       Action       DS
13456       Sports      GBA
13457      Shooter      GBA
13458       Action      PS3
13459       Action      PSP
13460         Misc       DS
13461       Racing       XB
13462       Sports      Wii
13463    Adventure       DS
13464       Action      PS4
13465       Puzzle      PS2
13466 Role-Playing      PSP
13467         Misc      3DS
13468         Misc      GBA
13469         Misc      PS2
13470         Misc       PS
13471       Action       DS
13472     Fighting      PS2
13473       Action      PSV
13474       Sports       PC
13475 Role-Playing       DS
13476       Action     XOne
13477       Puzzle      PS3
13478    Adventure      PS2
13479    Adventure       PC
13480       Action       GC
13481    Adventure       DS
13482       Action      PSV
13483         Misc      Wii
13484       Action      Wii
13485     Platform       GG
13486       Racing       XB
13487     Platform      3DS
13488      Shooter      PS2
13489       Sports      Wii
13490       Action      PS2
13491     Platform      GBA
13492       Action       PC
13493      Shooter     X360
13494         Misc      PSP
13495      Shooter       GC
13496       Racing      Wii
13497   Simulation       DS
13498         Misc      Wii
13499    Adventure      PSP
13500       Action       GC
13501       Action      GBA
13502     Platform      3DS
13503       Action      3DS
13504     Strategy       XB
13505    Adventure      PS3
13506       Racing      Wii
13507       Action       PC
13508     Platform     SNES
13509 Role-Playing      GBA
13510      Shooter      Wii
13511     Strategy      PS4
13512       Sports       DS
13513      Shooter      GBA
13514   Simulation       PC
13515     Fighting       PS
13516 Role-Playing      PSP
13517       Action       DS
13518    Adventure      PSP
13519    Adventure      PSP
13520         Misc      PSP
13521    Adventure      PS2
13522     Platform      PS3
13523       Action       DS
13524     Fighting     X360
13525    Adventure       DS
13526   Simulation      PS2
13527       Sports      Wii
13528 Role-Playing      PSV
13529       Action       PS
13530       Action     X360
13531       Sports       XB
13532   Simulation       PC
13533         Misc      GBA
13534    Adventure      PS2
13535       Action       DS
13536       Action      PS2
13537     Strategy       PC
13538         Misc       DS
13539    Adventure      PSV
13540       Sports      PSP
13541    Adventure      PS2
13542       Racing       XB
13543     Fighting      PSP
13544       Action      3DS
13545     Fighting      PS2
13546    Adventure      PSP
13547       Action       DS
13548 Role-Playing       PC
13549       Action      Wii
13550       Sports       XB
13551   Simulation      PS3
13552     Fighting      PS3
13553       Sports     X360
13554       Action      GBA
13555 Role-Playing      PS3
13556    Adventure     XOne
13557       Action      PS3
13558      Shooter      Wii
13559      Shooter     X360
13560    Adventure       DS
13561       Action       DS
13562       Action      3DS
13563    Adventure       DS
13564    Adventure      Wii
13565         Misc      PS3
13566    Adventure       PC
13567      Shooter      Wii
13568       Action      GBA
13569       Racing       XB
13570   Simulation       PS
13571       Puzzle       DS
13572       Action      PS2
13573     Platform       XB
13574     Fighting      PS3
13575   Simulation      PS2
13576   Simulation       DS
13577       Sports      PS2
13578       Sports       PS
13579     Fighting      PS4
13580       Puzzle      PSP
13581     Strategy       DS
13582         Misc      3DS
13583     Fighting       XB
13584     Strategy       PC
13585       Racing       PC
13586       Sports       XB
13587      Shooter       PC
13588    Adventure      PSV
13589       Action      PSP
13590       Sports       GC
13591       Action      PSP
13592         Misc       DS
13593 Role-Playing       DS
13594     Platform      Wii
13595     Fighting      PSV
13596       Sports       XB
13597    Adventure      PSP
13598         Misc       DS
13599      Shooter       XB
13600       Action      PSP
13601       Racing      PS3
13602       Racing       PC
13603     Fighting       GC
13604    Adventure       PC
13605       Action      3DS
13606       Action      3DS
13607       Action      3DS
13608       Sports       PC
13609   Simulation       DS
13610 Role-Playing      PSP
13611       Racing      PSP
13612       Action      PSP
13613       Puzzle       DS
13614         Misc       DS
13615       Action      PSP
13616       Puzzle      Wii
13617    Adventure      PSP
13618         Misc      PS2
13619       Sports      PS2
13620       Puzzle      PSP
13621   Simulation       PC
13622   Simulation       DS
13623 Role-Playing     SNES
13624         Misc      3DS
13625       Action       PC
13626       Action      PSV
13627   Simulation       PC
13628     Fighting     X360
13629       Puzzle       DS
13630     Strategy       PC
13631   Simulation       DS
13632         Misc      PSV
13633    Adventure      PSP
13634     Platform      Wii
13635         Misc      PS3
13636      Shooter       DS
13637       Puzzle       DS
13638    Adventure      PSP
13639       Sports      PS2
13640       Sports      PS4
13641 Role-Playing       DS
13642       Action      PS3
13643       Sports       PC
13644     Strategy       PC
13645   Simulation       XB
13646     Strategy       PC
13647    Adventure      PS2
13648 Role-Playing       DS
13649     Strategy       PC
13650     Fighting      Wii
13651       Action       DS
13652      Shooter      PS2
13653       Sports       PS
13654       Sports       DS
13655     Strategy       PC
13656    Adventure      PSP
13657       Action      GBA
13658       Action       PC
13659       Puzzle       DS
13660     Fighting       XB
13661    Adventure     X360
13662      Shooter     X360
13663       Sports      3DS
13664         Misc      PSP
13665       Action      Wii
13666   Simulation       DS
13667 Role-Playing       DS
13668      Shooter       PS
13669 Role-Playing      PSP
13670       Puzzle     X360
13671       Racing      PS3
13672     Strategy       PC
13673       Sports       PS
13674       Sports      N64
13675       Sports      PS3
13676       Sports      N64
13677       Action       DS
13678       Sports      SAT
13679    Adventure      SAT
13680         Misc      PSP
13681       Action      PSV
13682       Action      PS2
13683       Sports     X360
13684     Strategy       PC
13685      Shooter       DS
13686    Adventure      PSP
13687    Adventure      PS4
13688    Adventure      Wii
13689       Sports       PC
13690 Role-Playing     SNES
13691     Strategy       XB
13692       Racing       PC
13693       Action      PS3
13694       Action      PSP
13695       Sports       GC
13696     Fighting      PS3
13697 Role-Playing      3DS
13698       Action     XOne
13699    Adventure      3DS
13700     Strategy       PC
13701      Shooter     X360
13702     Strategy       PC
13703       Action      PSP
13704    Adventure      3DS
13705    Adventure      Wii
13706       Sports      Wii
13707       Racing     SNES
13708       Racing      N64
13709     Strategy      N64
13710       Racing      N64
13711     Platform      N64
13712     Strategy      N64
13713     Fighting      N64
13714     Platform      GBA
13715       Action      PSP
13716       Action      PS2
13717       Racing      PSV
13718     Platform       GC
13719 Role-Playing      PSP
13720     Strategy       XB
13721       Sports      PSP
13722     Strategy       PC
13723         Misc       DS
13724      Shooter       PS
13725 Role-Playing      PSP
13726     Strategy       PC
13727       Sports      PSP
13728     Strategy       PC
13729    Adventure      PS3
13730    Adventure      PSP
13731      Shooter      PS2
13732       Racing      PS2
13733         Misc       DS
13734    Adventure       DS
13735 Role-Playing      PS2
13736     Platform      PS3
13737   Simulation       DS
13738       Sports      GBA
13739 Role-Playing      PS3
13740       Action      PS2
13741       Racing       DS
13742       Action     X360
13743      Shooter      PSP
13744    Adventure      PS2
13745     Strategy       PC
13746     Fighting      PSP
13747       Sports      PS2
13748     Platform      GBA
13749         Misc       DS
13750       Puzzle       DS
13751       Action       PC
13752     Fighting      PS2
13753    Adventure      PS3
13754    Adventure      PSP
13755       Sports      Wii
13756       Action       XB
13757         Misc       DS
13758       Puzzle      GBA
13759       Sports       DS
13760     Strategy      PS2
13761      Shooter      PS3
13762       Puzzle       DS
13763         Misc       DS
13764         Misc       XB
13765   Simulation       PS
13766    Adventure      PSP
13767    Adventure       DS
13768       Action      PS3
13769     Fighting     X360
13770     Fighting      Wii
13771       Action      PS3
13772 Role-Playing      PSP
13773       Action      PSV
13774    Adventure       DS
13775     Fighting      PS2
13776    Adventure       DS
13777    Adventure      PSP
13778       Action      PS2
13779       Racing      GBA
13780       Action       DS
13781    Adventure      3DS
13782       Sports     X360
13783       Action      PS4
13784       Puzzle      Wii
13785       Action       PC
13786         Misc      3DS
13787     Strategy       PS
13788         Misc       PC
13789       Sports      PS3
13790       Action     X360
13791     Fighting       DS
13792       Action       PS
13793       Sports      GBA
13794      Shooter      PSP
13795      Shooter      Wii
13796    Adventure       PC
13797       Puzzle     X360
13798 Role-Playing       PC
13799     Strategy       PC
13800       Action      PSP
13801   Simulation       PC
13802       Racing      PSP
13803    Adventure      PS3
13804       Action       PC
13805 Role-Playing      PS4
13806       Sports      Wii
13807 Role-Playing      PSV
13808    Adventure       XB
13809         Misc      SAT
13810    Adventure      PSP
13811         Misc       DS
13812     Fighting       GC
13813   Simulation       PC
13814     Platform      3DS
13815         Misc      PS2
13816         Misc      PS2
13817       Sports       PS
13818       Sports      PS2
13819    Adventure      3DS
13820     Strategy      PS2
13821       Action      PS4
13822         Misc       DS
13823 Role-Playing      GBA
13824    Adventure       PS
13825       Action      PS4
13826       Puzzle       DS
13827      Shooter       DS
13828       Action      PSV
13829     Strategy       PS
13830       Puzzle      GBA
13831       Action      PSP
13832       Racing       PC
13833   Simulation       DS
13834 Role-Playing      PSP
13835       Puzzle       PS
13836       Racing       XB
13837         Misc      Wii
13838       Sports     XOne
13839       Action       DS
13840       Action       DC
13841     Fighting       GC
13842         Misc      Wii
13843         Misc       DS
13844       Action      PS2
13845       Racing      Wii
13846         Misc      PSP
13847       Sports     X360
13848         Misc       DS
13849    Adventure      PS2
13850       Action       PC
13851       Racing       XB
13852       Action      3DS
13853         Misc       PS
13854       Puzzle       DS
13855     Strategy      PSP
13856       Puzzle      PSP
13857     Platform       PS
13858    Adventure      Wii
13859   Simulation       PC
13860    Adventure       PS
13861       Action      PSP
13862      Shooter       PS
13863       Action       DS
13864       Sports      PS2
13865         Misc      PSV
13866       Sports       DS
13867   Simulation       PC
13868      Shooter       PS
13869     Strategy       PS
13870      Shooter      Wii
13871       Sports       PS
13872     Strategy       PC
13873   Simulation       PS
13874    Adventure      PS3
13875       Action     XOne
13876       Action      GBA
13877     Fighting       NG
13878         Misc       DS
13879       Action      GBA
13880         Misc       PS
13881       Action      PSP
13882      Shooter       PC
13883       Action      GBA
13884       Action      PSP
13885    Adventure      PS2
13886       Puzzle       DS
13887         Misc      PSP
13888      Shooter      GBA
13889     Strategy      PSP
13890       Sports       GC
13891       Racing     XOne
13892    Adventure      PSP
13893       Action      3DS
13894 Role-Playing      PSV
13895       Sports       GC
13896       Action       PC
13897      Shooter       DS
13898       Sports      PS2
13899         Misc      Wii
13900      Shooter       PC
13901    Adventure      PS2
13902 Role-Playing      PS4
13903       Racing     X360
13904      Shooter       DS
13905    Adventure      PS3
13906 Role-Playing      PS3
13907         Misc       DS
13908       Racing      GBA
13909 Role-Playing       DS
13910       Action      PS4
13911       Racing      PSP
13912     Strategy       PC
13913       Sports      PS2
13914   Simulation       DS
13915    Adventure       DC
13916     Strategy       PC
13917    Adventure      Wii
13918       Racing      PS3
13919       Action      PS2
13920 Role-Playing      PSV
13921 Role-Playing       PC
13922      Shooter      GBA
13923    Adventure      PSP
13924       Racing      PSV
13925         Misc       DS
13926       Puzzle       DS
13927      Shooter      Wii
13928       Action       PC
13929       Action      GBA
13930 Role-Playing     X360
13931      Shooter       DS
13932     Platform      GBA
13933     Fighting      SAT
13934 Role-Playing      PSV
13935     Strategy      PS2
13936 Role-Playing      PS2
13937       Puzzle       PS
13938       Action      PSP
13939    Adventure      PSP
13940    Adventure       DS
13941       Action      GBA
13942         Misc      PS2
13943     Platform       GC
13944       Sports      PS3
13945    Adventure     X360
13946       Action       PC
13947     Strategy      PS3
13948 Role-Playing      PS3
13949     Fighting      PS2
13950       Puzzle       DS
13951       Action       PC
13952     Strategy      3DS
13953    Adventure      PSP
13954       Racing      PSP
13955         Misc      PS3
13956 Role-Playing       PS
13957       Puzzle      PSP
13958         Misc      PS2
13959       Racing       XB
13960         Misc       DS
13961      Shooter      PS2
13962       Racing      PS2
13963     Fighting       DC
13964       Action       XB
13965       Racing       PC
13966       Puzzle      PSP
13967       Action       XB
13968       Action       PC
13969 Role-Playing      PS3
13970     Platform       PC
13971      Shooter      GBA
13972         Misc       DS
13973   Simulation       PC
13974    Adventure      PSP
13975    Adventure      PSP
13976     Strategy       DS
13977    Adventure      PS2
13978       Sports       XB
13979       Sports      PS2
13980       Sports      Wii
13981    Adventure       DS
13982      Shooter      PS2
13983       Puzzle       DS
13984    Adventure      PS2
13985         Misc      PS2
13986       Action      PSP
13987       Sports       DS
13988   Simulation       PC
13989         Misc       PS
13990      Shooter       PC
13991       Sports      GBA
13992      Shooter       XB
13993       Sports       DS
13994 Role-Playing      PS4
13995       Sports      GEN
13996    Adventure       XB
13997         Misc       DS
13998     Strategy      PS2
13999         Misc     XOne
14000         Misc     X360
14001 Role-Playing      PSV
14002   Simulation       DS
14003      Shooter     X360
14004       Action      GBA
14005         Misc      3DS
14006       Puzzle       PC
14007 Role-Playing      PSP
14008       Sports     X360
14009     Strategy       PC
14010 Role-Playing       PS
14011         Misc       DS
14012       Action      PS4
14013         Misc      3DS
14014    Adventure       PC
14015         Misc      Wii
14016 Role-Playing      PSP
14017     Strategy       PC
14018       Action       DS
14019   Simulation       DS
14020 Role-Playing       DS
14021       Action      PSV
14022       Puzzle      Wii
14023     Platform      GBA
14024    Adventure      PSP
14025         Misc      GBA
14026 Role-Playing       DS
14027 Role-Playing       DS
14028      Shooter       PC
14029 Role-Playing       XB
14030       Racing      PS2
14031     Strategy       PC
14032         Misc       DS
14033    Adventure      PS2
14034      Shooter       XB
14035       Action      3DS
14036         Misc      PS2
14037       Racing       DS
14038      Shooter      PS3
14039    Adventure      PSP
14040     Platform      GEN
14041    Adventure       DS
14042       Action      PSP
14043         Misc       DS
14044 Role-Playing       DS
14045       Action     WiiU
14046     Strategy       PC
14047    Adventure      PS3
14048 Role-Playing      PSV
14049     Strategy      3DS
14050   Simulation      PS2
14051         Misc       DS
14052       Racing      Wii
14053   Simulation      3DS
14054       Action      3DS
14055       Action      GBA
14056       Action      PS3
14057       Sports      PSV
14058         Misc      PS3
14059       Sports       PC
14060       Action       DS
14061       Racing       XB
14062       Action      3DS
14063       Action       PC
14064       Action      PS4
14065      Shooter      Wii
14066       Action      PS4
14067         Misc      PS3
14068       Puzzle       DS
14069       Sports      PS4
14070       Sports       XB
14071 Role-Playing       DS
14072         Misc       DS
14073       Puzzle      PSP
14074       Action      PS2
14075      Shooter      SAT
14076    Adventure       PC
14077       Action      PSP
14078       Action      GBA
14079       Racing     X360
14080       Action      PSP
14081    Adventure       DS
14082       Puzzle       DS
14083       Action      GBA
14084       Racing      PSP
14085     Fighting      GBA
14086       Racing       XB
14087     Strategy       PC
14088 Role-Playing       PC
14089         Misc      PS2
14090       Action      PSV
14091       Action      GBA
14092       Racing       PC
14093      Shooter      GBA
14094       Action      3DS
14095         Misc      PS2
14096 Role-Playing      GBA
14097       Action       PC
14098     Strategy       PC
14099     Fighting      PSV
14100         Misc      PS3
14101     Strategy       PC
14102   Simulation       PC
14103       Racing      PS3
14104       Sports      PS2
14105       Sports       GC
14106       Action      Wii
14107       Action      GBA
14108    Adventure      PS3
14109       Action      3DS
14110     Strategy       PS
14111       Action       PC
14112    Adventure       DS
14113    Adventure      PS2
14114      Shooter      PS4
14115      Shooter       PC
14116    Adventure      PS2
14117 Role-Playing       PC
14118 Role-Playing       PC
14119         Misc      PS2
14120       Puzzle      PSP
14121       Racing       GC
14122   Simulation       DS
14123       Puzzle      3DS
14124       Racing      GBA
14125      Shooter       PC
14126      Shooter       GC
14127 Role-Playing      3DS
14128 Role-Playing      PS4
14129 Role-Playing       DS
14130     Strategy       WS
14131      Shooter      PS2
14132       Action       PC
14133      Shooter       XB
14134       Sports      PS2
14135       Sports      Wii
14136         Misc      PS2
14137 Role-Playing      PS2
14138       Action      PS2
14139       Racing      PSP
14140   Simulation       DS
14141       Action       PS
14142     Strategy      3DS
14143       Action       PC
14144       Sports       GC
14145       Action     WiiU
14146       Sports     X360
14147     Strategy      PS3
14148       Sports      GBA
14149       Racing      PS3
14151       Action      3DS
14152    Adventure      PSP
14153 Role-Playing      GBA
14154     Fighting      PSP
14155     Platform      GBA
14156 Role-Playing      PSP
14157    Adventure      PSP
14158     Fighting      Wii
14159       Racing       GC
14160       Sports       DS
14161 Role-Playing      PSP
14162       Racing       DS
14163     Fighting      PS4
14164       Action       PS
14165       Action      PS3
14166    Adventure      PS2
14167       Action      PS3
14168       Sports       PS
14169         Misc      PS2
14170 Role-Playing     SNES
14171   Simulation     X360
14172       Action       DS
14173 Role-Playing      3DS
14174    Adventure       PC
14175    Adventure       PS
14176     Strategy       PC
14177     Strategy       PC
14178      Shooter       GC
14179     Platform      GBA
14180     Platform      3DS
14181 Role-Playing       PC
14182    Adventure       PS
14183    Adventure       DS
14184 Role-Playing      PSP
14185 Role-Playing     SNES
14186    Adventure      PS2
14187       Sports      Wii
14188       Puzzle       PC
14189    Adventure       DS
14190       Puzzle       DS
14191         Misc     WiiU
14192    Adventure      Wii
14193       Puzzle       DS
14194         Misc       DS
14195         Misc      PSP
14196   Simulation       DS
14197      Shooter       PC
14198    Adventure      PS3
14199         Misc       DS
14200         Misc      PS4
14201      Shooter       PS
14202       Racing       PC
14203       Sports       PC
14204       Action       XB
14205       Racing      Wii
14206       Action      GBA
14207       Action      PS4
14208         Misc       PC
14209       Puzzle      Wii
14210 Role-Playing      PS3
14211    Adventure       PC
14212       Sports      GBA
14213       Racing     X360
14214     Platform      GBA
14215       Sports      3DS
14216 Role-Playing      PSP
14217     Strategy       PC
14218 Role-Playing      PS3
14219   Simulation      3DS
14220       Racing      PSP
14221 Role-Playing      3DS
14222     Platform     WiiU
14223     Strategy       DS
14224       Racing      PSP
14225       Racing      GBA
14226         Misc       DS
14227   Simulation       PC
14228     Strategy      PS3
14229       Sports       DS
14230       Sports      PS2
14231      Shooter       PC
14232 Role-Playing      PS3
14233      Shooter       PC
14234       Action      PS3
14235 Role-Playing      3DS
14236       Sports       GC
14237       Action      3DS
14238       Sports      PSV
14239   Simulation      3DS
14240     Fighting      PSP
14241   Simulation       DS
14242       Racing       PC
14243       Action       GC
14244 Role-Playing       PC
14245     Strategy      PSV
14246     Strategy      PS2
14247 Role-Playing      PSP
14248       Action      PS2
14249       Action       PS
14250         Misc      3DS
14251       Action       PC
14252     Fighting       DS
14253         Misc       DS
14254   Simulation       PC
14255    Adventure      PS3
14256       Sports      GBA
14257       Sports       DS
14258    Adventure     XOne
14259   Simulation       XB
14260    Adventure     X360
14261       Puzzle       PC
14262         Misc      PSP
14263    Adventure       DS
14264     Platform      PSP
14265    Adventure       PC
14266       Action      3DS
14267    Adventure       DS
14268     Platform      GBA
14269       Racing       PC
14270         Misc     X360
14271         Misc       DS
14272       Action      PS4
14273       Action       DS
14274         Misc       DS
14275   Simulation      PS2
14276         Misc      SAT
14277       Action      3DS
14278       Action       PC
14279         Misc       DS
14280       Action       PC
14281 Role-Playing      SAT
14282       Racing      Wii
14283    Adventure      PS2
14284       Action      PS3
14285    Adventure      3DS
14286     Platform       XB
14287    Adventure      GBA
14288 Role-Playing      PS4
14289     Platform      PSV
14290       Action      PSV
14291       Action       PC
14292   Simulation       DS
14293       Sports       DS
14294   Simulation       DS
14295       Sports       DS
14296         Misc      PS2
14297    Adventure      PSP
14298         Misc       DS
14299 Role-Playing      PSP
14300 Role-Playing      PSP
14301    Adventure      SAT
14302   Simulation       DS
14303       Racing       PC
14304       Racing       PC
14305       Racing      PS3
14306   Simulation       DS
14307       Action      PS4
14308    Adventure       PC
14309 Role-Playing      PSV
14310       Racing       DS
14311       Action      PSV
14312         Misc      Wii
14313   Simulation       DS
14314     Strategy       PC
14315 Role-Playing      PSP
14316       Racing       DS
14317 Role-Playing      PSV
14318    Adventure      PS2
14319       Sports     X360
14320       Action      3DS
14321     Fighting      PS3
14322       Sports      PS3
14323       Sports     X360
14324 Role-Playing      PSV
14325      Shooter      PS3
14326       Sports      PS3
14327    Adventure     X360
14328       Action      PS2
14329     Platform      GBA
14330       Puzzle       DS
14331       Action       PS
14332    Adventure     X360
14333         Misc     SNES
14334    Adventure       PC
14335       Action      PSV
14336       Action       GC
14337 Role-Playing      PSP
14338     Strategy       PC
14339       Action      PS3
14340    Adventure      PSV
14341       Racing       GC
14342      Shooter     X360
14343     Fighting      SAT
14344    Adventure      PSP
14345     Strategy      SAT
14346       Racing      GBA
14347     Platform      GBA
14348    Adventure      PSP
14349     Platform       DS
14350     Strategy       PC
14351 Role-Playing      Wii
14352       Action      PSV
14353    Adventure       DS
14354    Adventure       DS
14355         Misc      Wii
14356       Puzzle      PSP
14357    Adventure      PSP
14358    Adventure      PSV
14359         Misc       XB
14360       Puzzle       DS
14361    Adventure      PSP
14362         Misc       DS
14363       Sports      PSV
14364    Adventure      PSV
14365    Adventure      PS2
14366         Misc       PC
14367     Platform       PC
14368     Platform       GC
14369 Role-Playing      PS3
14370      Shooter     X360
14371       Puzzle      PS2
14372   Simulation       PC
14373    Adventure      PS2
14374    Adventure      3DS
14375     Fighting      PS3
14376       Action       PC
14377       Racing     XOne
14378    Adventure      SAT
14379       Sports     X360
14380       Sports     XOne
14381   Simulation       DS
14382 Role-Playing       PC
14383     Fighting      PS2
14384       Puzzle       DS
14385       Action      PSV
14386         Misc       PC
14387    Adventure      PSP
14388       Action     X360
14389       Sports      PSP
14390         Misc      GEN
14391       Action      PSP
14392       Action      PS3
14393 Role-Playing       XB
14394     Fighting      Wii
14395       Action       DS
14396       Action       XB
14397         Misc       DS
14398       Sports      PS3
14399       Action       DS
14400    Adventure      PSP
14401       Sports      PS2
14402     Fighting       NG
14403    Adventure       DS
14404   Simulation       PC
14405       Racing       PS
14406     Platform      Wii
14407    Adventure      PSV
14408    Adventure      PSP
14409 Role-Playing      PSP
14410 Role-Playing      PSP
14411       Action      PS4
14412       Sports       PC
14413 Role-Playing      GBA
14414         Misc     WiiU
14415       Action      PSP
14416       Action       PC
14417       Action      PS3
14418         Misc     WiiU
14419    Adventure       PS
14420         Misc       DS
14421    Adventure      PS2
14422   Simulation      PS2
14423 Role-Playing       PC
14424       Sports       GC
14425    Adventure      PSV
14426       Action       DS
14427         Misc       DS
14428       Racing       PS
14429   Simulation       PC
14430       Action      3DS
14431    Adventure      3DS
14432    Adventure       DS
14433   Simulation      PS2
14434       Racing       XB
14435       Action       DS
14436       Action      3DS
14437     Strategy       PC
14438       Action       PS
14439     Platform       PC
14440     Fighting     X360
14441       Sports     X360
14442       Sports       DS
14443 Role-Playing      PS2
14444     Strategy       PC
14445   Simulation      PSP
14446       Action      PSV
14447    Adventure      PSP
14448      Shooter       PS
14449       Puzzle      PSP
14450     Platform      GBA
14451         Misc       DS
14452     Platform      PSP
14453       Sports      PSP
14454       Racing       PS
14455       Puzzle      GBA
14456         Misc      PS2
14457         Misc      GBA
14458 Role-Playing      PSP
14459    Adventure       DS
14460       Racing      GBA
14461 Role-Playing       DS
14462       Sports      N64
14463     Platform      N64
14464       Action      N64
14465     Fighting     X360
14466     Strategy       PC
14467 Role-Playing      GBA
14468    Adventure       DS
14469    Adventure       PC
14470     Fighting      PSP
14471       Action       DS
14472       Action     WiiU
14473         Misc       DS
14474         Misc     SNES
14475       Puzzle      GBA
14476       Action      PSP
14477    Adventure       DS
14478         Misc      PSP
14479       Action      Wii
14480         Misc      PS3
14481    Adventure      PS2
14482     Strategy       PC
14483    Adventure      PSP
14484       Action       DS
14485     Strategy       PS
14486     Strategy      PS2
14487    Adventure      PS2
14488     Strategy     SNES
14489         Misc      Wii
14490      Shooter       PS
14491     Strategy      PS2
14492       Puzzle      PSP
14493       Puzzle       DS
14494 Role-Playing      PSV
14495       Racing     XOne
14496       Action       DS
14497     Strategy       PC
14498     Fighting       PS
14499    Adventure      Wii
14500   Simulation      PS3
14501      Shooter      GBA
14502       Action       PC
14503       Racing      Wii
14504       Action      PSV
14505       Puzzle      PSP
14506 Role-Playing      3DS
14507    Adventure      PS2
14508       Puzzle      GBA
14509       Action       DS
14510      Shooter       PC
14511     Strategy       XB
14512 Role-Playing     X360
14513       Sports      GBA
14514   Simulation      PSP
14515     Strategy       PS
14516     Strategy      Wii
14517       Action       XB
14518     Platform      GBA
14519       Sports       XB
14520       Action      PSV
14521   Simulation       PC
14522         Misc      PSP
14523       Action       PC
14524       Action      PSV
14525       Racing      Wii
14526 Role-Playing      PSV
14527 Role-Playing       DS
14528       Action       DS
14529      Shooter       PC
14530       Racing       DS
14531     Strategy      3DS
14532     Platform      GBA
14533     Strategy      PS2
14534 Role-Playing     PCFX
14535       Action      PS3
14536   Simulation      PS2
14537         Misc      PSP
14538       Action      GBA
14539    Adventure      PSV
14540    Adventure       DS
14541         Misc     SNES
14542       Sports       XB
14543       Action      3DS
14544       Action      PSP
14545       Racing       PC
14546         Misc      PS3
14547    Adventure      PSP
14548 Role-Playing       PC
14549       Sports      PSP
14550     Strategy       PC
14551 Role-Playing      PSV
14552    Adventure     X360
14553         Misc      3DS
14554       Action       DS
14555       Sports       PC
14556       Action       PC
14557      Shooter      PS2
14558       Action       PC
14559       Action       DS
14560         Misc      PSP
14561    Adventure     XOne
14562     Platform       XB
14563       Puzzle       DS
14564       Action       PS
14565     Strategy       DS
14566 Role-Playing       XB
14567       Racing       GC
14568   Simulation       PC
14569   Simulation      PS2
14570    Adventure       DS
14571 Role-Playing       PC
14572         Misc     X360
14573       Action      GBA
14574         Misc       DS
14575     Strategy       XB
14576       Sports      PS3
14577       Sports      GBA
14578         Misc       DS
14579    Adventure      PSP
14580    Adventure      PSV
14581 Role-Playing      PSP
14582       Action      Wii
14583       Sports      PS3
14584     Strategy       PC
14585      Shooter     X360
14586       Action       PC
14587       Racing      PSP
14588    Adventure       DS
14589       Action      PS4
14590       Action      GBA
14591      Shooter       PC
14592 Role-Playing      PSV
14593         Misc      PS3
14594    Adventure      PSV
14595     Platform     WiiU
14596       Racing       PS
14597       Puzzle       DS
14598      Shooter     X360
14599    Adventure       PC
14600       Action      PSV
14601       Sports      GBA
14602       Action       PC
14603       Racing       XB
14604     Strategy      PS2
14605       Action       DS
14606     Strategy      PSP
14607 Role-Playing      PSV
14608       Puzzle      PS4
14609     Fighting      GBA
14610    Adventure      PSP
14611 Role-Playing      PSP
14612    Adventure       XB
14613       Racing       XB
14614     Platform       PC
14615       Action      3DS
14616    Adventure       DS
14617       Action       DS
14618       Action       PC
14619       Action      Wii
14620    Adventure       DS
14621     Fighting      PSP
14622       Puzzle      Wii
14623       Action       DS
14624    Adventure      PSP
14625    Adventure       PC
14626   Simulation       DS
14627       Action       PC
14628    Adventure       PS
14629       Action       GC
14630    Adventure      PSP
14631       Action      PSV
14632       Action      GBA
14633       Action     SNES
14634       Action       DS
14635     Fighting      PS2
14636       Action     X360
14637       Racing       PC
14638     Fighting       XB
14639       Sports       XB
14640         Misc      PSP
14641    Adventure       DS
14642    Adventure      PSP
14643    Adventure      PS2
14644    Adventure      PSP
14645    Adventure      PSP
14646         Misc       PC
14647 Role-Playing      PSP
14648    Adventure      Wii
14649     Strategy       DS
14650       Action      PS3
14651 Role-Playing       DS
14652     Platform       GC
14653         Misc      PS3
14654    Adventure      PSV
14655   Simulation      PSV
14656       Action       PC
14657       Action      PS3
14658   Simulation       PC
14659       Puzzle       PC
14660    Adventure      PSV
14661     Fighting      SAT
14662         Misc     WiiU
14663       Puzzle       DS
14664         Misc     X360
14665       Action     X360
14666      Shooter     X360
14667 Role-Playing      PSV
14668   Simulation       PC
14669     Platform      PSP
14670   Simulation       DS
14671    Adventure      PS4
14672       Action       PC
14673       Action      PS3
14674       Sports      GBA
14675 Role-Playing      PSV
14676       Sports      Wii
14677    Adventure      PS2
14678    Adventure      PSP
14679 Role-Playing     X360
14680         Misc      PS3
14681    Adventure       PC
14682       Racing      PS2
14683      Shooter      GBA
14684         Misc       PS
14685   Simulation       DS
14686         Misc      PSP
14687         Misc       PS
14688       Sports       XB
14689       Action      Wii
14690       Action      3DS
14691    Adventure      PSP
14692     Strategy      PS2
14693       Sports     X360
14694     Strategy      PSP
14695     Strategy       PC
14696 Role-Playing      PSV
14697       Racing      PS3
14698       Racing       GC
14699       Action      PS3
14700    Adventure      PSV
14701       Sports       XB
14702       Racing       GC
14703         Misc      PSP
14704         Misc       DS
14705      Shooter      GBA
14706       Sports      GBA
14707   Simulation      PSV
14708    Adventure       DS
14709    Adventure      PSV
14710    Adventure       DS
14711     Platform       XB
14712       Action       DS
14713 Role-Playing       DS
14714         Misc      3DS
14715 Role-Playing      PSP
14716 Role-Playing      PSP
14717      Shooter      SAT
14718     Fighting      PSP
14719         Misc      PS2
14720     Strategy       PC
14721       Action      PSP
14722       Action      PS3
14723     Fighting      PS2
14724   Simulation      PS2
14725     Platform      PSV
14726      Shooter       GC
14727       Racing      Wii
14728      Shooter       PC
14729       Sports      PS3
14730    Adventure      Wii
14731       Sports       PS
14732     Fighting      PS2
14733       Racing      GBA
14734       Action      PS4
14735       Puzzle       XB
14736 Role-Playing       PC
14737    Adventure      PS3
14738       Action      Wii
14739    Adventure      PS3
14740       Action      3DS
14741    Adventure      PS2
14742         Misc       PC
14743     Fighting      3DS
14744       Action       GC
14745       Action      PSP
14746    Adventure     X360
14747    Adventure      PS2
14748       Action      GBA
14749       Sports      PS3
14750       Action       PC
14751       Action       DS
14752       Action       DS
14753      Shooter       PC
14754 Role-Playing       PC
14755         Misc       PC
14756 Role-Playing      GBA
14757     Platform       PS
14758       Action      PS2
14759    Adventure       DS
14760       Action       DS
14761     Platform       PS
14762       Action       PS
14763       Sports       XB
14764       Sports     XOne
14765    Adventure      PSV
14766   Simulation      PS2
14767       Racing      PS2
14768 Role-Playing     XOne
14769       Action      PS4
14770       Action      PSV
14771   Simulation      3DS
14772    Adventure      PSP
14773 Role-Playing       PC
14774         Misc     X360
14775       Sports       GC
14776     Strategy      PSP
14777      Shooter      PSP
14778       Sports       DS
14779      Shooter      PS2
14780    Adventure      PS3
14781      Shooter       PS
14782    Adventure       DS
14783         Misc      PS4
14784       Puzzle      PS2
14785     Platform      PS2
14786       Sports     SNES
14787       Sports      GBA
14788     Fighting      3DS
14789       Racing       PS
14790     Strategy      3DS
14791   Simulation       PC
14792   Simulation       PC
14793   Simulation       DS
14794         Misc      GBA
14795         Misc      PSV
14796       Action       PC
14797       Action      PS4
14798   Simulation      Wii
14799       Sports      Wii
14800       Action      PS4
14801         Misc      GBA
14802       Action       PC
14803       Sports      PS2
14804       Action      PSV
14805     Strategy       PC
14806       Action      GBA
14807   Simulation       DS
14808   Simulation      3DS
14809     Strategy       PC
14810         Misc       DS
14811      Shooter       XB
14812 Role-Playing      PS2
14813 Role-Playing       PC
14814     Platform      Wii
14815      Shooter       PC
14816   Simulation       DS
14817    Adventure      PS2
14818   Simulation      PS2
14819   Simulation       PC
14820       Puzzle      GBA
14821   Simulation      Wii
14822    Adventure      PSV
14823         Misc       DS
14824    Adventure      PS2
14825       Action       DS
14826      Shooter       PC
14827       Racing      Wii
14828   Simulation       PC
14829    Adventure      PSP
14830       Puzzle      PSP
14831    Adventure      SAT
14832       Action      PSV
14833     Platform      PS2
14834       Sports      Wii
14835     Platform       DS
14836 Role-Playing     X360
14837    Adventure      PS4
14838       Action       DS
14839   Simulation      Wii
14840       Sports      Wii
14841         Misc      PS4
14842   Simulation      PS2
14843         Misc      PSP
14844         Misc      PS3
14845       Sports       PS
14846    Adventure      PSP
14847      Shooter      PS2
14848       Racing       DS
14849       Racing      GBA
14850      Shooter       PC
14851    Adventure      PSP
14852       Puzzle       DS
14853       Action       PC
14854      Shooter       PC
14855    Adventure       DS
14856         Misc      PS3
14857         Misc      PS2
14858       Sports      PS2
14859    Adventure       PC
14860 Role-Playing      GBA
14861      Shooter       PS
14862   Simulation       DS
14863    Adventure      PSV
14864    Adventure      PSP
14865       Action       DS
14866    Adventure       PC
14867       Puzzle       DS
14868       Action      PSP
14869         Misc       DS
14870       Action     SNES
14871   Simulation       DS
14872     Platform      Wii
14873     Fighting       PS
14874   Simulation       DS
14875       Action      PSV
14876       Action      PS4
14877       Action      PS2
14878      Shooter     XOne
14879 Role-Playing      3DS
14880 Role-Playing       PC
14881    Adventure       PS
14882    Adventure       DS
14883     Strategy       PC
14884    Adventure      PSV
14885    Adventure      PS2
14886       Sports      PSP
14887       Puzzle       DS
14888 Role-Playing      PSV
14889       Sports      PS3
14890       Action       DS
14891         Misc      PSP
14892 Role-Playing       PC
14893    Adventure       DS
14894       Puzzle       GC
14895       Racing       PC
14896       Racing      GBA
14897 Role-Playing      PSV
14898    Adventure      PS2
14899    Adventure      PSP
14900       Racing       XB
14901    Adventure      PSV
14902         Misc      SAT
14903      Shooter     X360
14904     Fighting      PS2
14905   Simulation      Wii
14906   Simulation      Wii
14907     Fighting      PS4
14908    Adventure      PS3
14909       Action       DS
14910      Shooter      PS2
14911   Simulation       DS
14912       Action       PC
14913       Action      PS3
14914       Action     X360
14915     Fighting       XB
14916      Shooter      PS4
14917      Shooter      GBA
14918   Simulation      PS2
14919 Role-Playing       DS
14920       Action      PSP
14921       Sports     WiiU
14922   Simulation      PS2
14923       Action     WiiU
14924       Sports      Wii
14925       Sports       GC
14926       Racing       GC
14927      Shooter     X360
14928       Action     X360
14929       Sports      PSP
14930    Adventure       DS
14931      Shooter       XB
14932       Action      PSP
14933   Simulation       XB
14934    Adventure      PSV
14935 Role-Playing      PS3
14936       Sports       XB
14937    Adventure      PSP
14938       Racing      PS2
14939     Fighting      PSP
14940       Action       PC
14941 Role-Playing      PS4
14942       Action      GBA
14943       Action      PS3
14944       Action       XB
14945       Action       DS
14946       Action      PS3
14947       Action      PSV
14948     Platform       XB
14949       Action      PSP
14950         Misc      PS4
14951 Role-Playing      PSP
14952   Simulation       PC
14953    Adventure       DS
14954       Racing       DS
14955 Role-Playing       PC
14956       Puzzle       DS
14957         Misc       DS
14958         Misc     X360
14959     Strategy       PC
14960   Simulation       PC
14961 Role-Playing       PC
14962       Action       XB
14963      Shooter       XB
14964       Racing       PS
14965       Sports      PS2
14966     Strategy      PSP
14967     Strategy      PS3
14968       Action     X360
14969       Racing      GBA
14970       Puzzle      3DO
14971       Racing       PS
14972     Strategy       PC
14973     Strategy       PS
14974     Strategy       DS
14975       Racing      PSP
14976         Misc      Wii
14977       Action      PS4
14978       Action      PSV
14979     Strategy       PC
14980    Adventure      PS2
14981   Simulation       DS
14982    Adventure      PS2
14983    Adventure     X360
14984     Strategy       PC
14985       Sports      Wii
14986       Puzzle       PC
14987     Strategy       PC
14988      Shooter      GBA
14989       Action      PSV
14990     Platform       PS
14991 Role-Playing       DS
14992       Sports      Wii
14993       Action      PSV
14994   Simulation      PS2
14995    Adventure     X360
14996    Adventure       PC
14997    Adventure      PSP
14998     Strategy       GC
14999    Adventure      PSP
15000    Adventure      3DS
15001         Misc      Wii
15002       Action      PSP
15003     Fighting       PS
15004    Adventure      PSP
15005       Sports       DS
15006    Adventure      PSP
15007    Adventure      PS4
15008     Platform      Wii
15009    Adventure      PS2
15010       Action     X360
15011       Puzzle       PS
15012   Simulation       DS
15013     Strategy       PC
15014       Sports       DS
15015    Adventure     X360
15016       Puzzle       PC
15017      Shooter      GBA
15018         Misc      Wii
15019    Adventure      PSP
15020       Action      PS3
15021    Adventure      PS2
15022    Adventure       DS
15023 Role-Playing      PS2
15024     Strategy      PSP
15025       Racing       XB
15026       Puzzle      PSP
15027         Misc       PS
15028     Fighting      PS3
15029       Racing      Wii
15030       Action       DS
15031     Strategy       PC
15032      Shooter      Wii
15033       Sports     X360
15034       Action      PS3
15035     Strategy       PC
15036    Adventure      PS2
15037    Adventure      PS3
15038 Role-Playing      GBA
15039       Action      PS4
15040     Strategy       DS
15041       Puzzle       PC
15042     Platform      GBA
15043       Puzzle       DS
15044    Adventure      Wii
15045     Strategy       PC
15046    Adventure      PS2
15047 Role-Playing      GBA
15048         Misc       DS
15049   Simulation       PC
15050     Strategy       DS
15051       Sports       PS
15052 Role-Playing      GBA
15053       Sports     X360
15054       Puzzle      Wii
15055    Adventure      PSV
15056    Adventure      PSP
15057         Misc      Wii
15058   Simulation       PC
15059    Adventure       DS
15060         Misc      PSP
15061 Role-Playing       PC
15062       Action      PSP
15063     Fighting      PS2
15064      Shooter       PS
15065 Role-Playing       DS
15066       Action      PS4
15067 Role-Playing      PS2
15068      Shooter       PC
15069    Adventure      PS2
15070       Sports       XB
15071     Strategy       PC
15072         Misc      PSP
15073       Action       XB
15074 Role-Playing     X360
15075         Misc      PS3
15076         Misc      PSP
15077    Adventure      PSP
15078       Racing     X360
15079      Shooter       PC
15080    Adventure      PS2
15081       Puzzle      Wii
15082    Adventure       DS
15083       Racing       PC
15084    Adventure      PS2
15085   Simulation       PC
15086      Shooter     X360
15087       Action      PS2
15088    Adventure      PS2
15089    Adventure      PSV
15090         Misc      PSP
15091       Action       PC
15092 Role-Playing      PSP
15093       Action      3DS
15094    Adventure      PSP
15095 Role-Playing      GBA
15096     Fighting       XB
15097   Simulation       PC
15098         Misc      PSP
15099       Sports       XB
15100       Action       DS
15101 Role-Playing      PSV
15102    Adventure      3DS
15103    Adventure      PS2
15104       Sports      PS2
15105       Action       PC
15106       Action      PSV
15107 Role-Playing       PS
15108       Racing      Wii
15109         Misc       DS
15110    Adventure      PSP
15111    Adventure      PSP
15112       Action      PS2
15113       Sports       GC
15114       Puzzle       PC
15115       Racing       XB
15116    Adventure      PS3
15117     Fighting      PS2
15118       Sports      PS4
15119       Racing      PS2
15120       Action      PS3
15121       Racing       PC
15122       Action     WiiU
15123       Action      PSV
15124         Misc      PSV
15125       Puzzle       DS
15126     Fighting       PC
15127       Action       PC
15128    Adventure      PS3
15129     Strategy       DS
15130      Shooter       PC
15131       Puzzle       DS
15132         Misc      PSP
15133       Sports     XOne
15134       Sports       GC
15135     Strategy       PC
15136       Action       DS
15137 Role-Playing      PS4
15138      Shooter       XB
15139 Role-Playing      PSP
15140     Fighting       PS
15141       Puzzle       DS
15142       Sports      PS2
15143    Adventure       XB
15144         Misc      PS2
15145 Role-Playing      PS3
15146       Puzzle     SNES
15147      Shooter       PC
15148    Adventure      PS2
15149    Adventure       DS
15150      Shooter      PS2
15151    Adventure      PS3
15152       Action     X360
15153       Puzzle      PS2
15154         Misc       GC
15155       Action      PSP
15156       Racing       PC
15157      Shooter      SAT
15158      Shooter      Wii
15159    Adventure       PC
15160         Misc      PSP
15161   Simulation       DS
15162       Racing       PC
15163         Misc       DS
15164      Shooter      PS3
15165   Simulation      PS3
15166    Adventure      PSP
15167      Shooter       GC
15168    Adventure      PSV
15169         Misc      PS3
15170      Shooter       PC
15171       Action       XB
15172    Adventure       DS
15173    Adventure      PS2
15174   Simulation       DS
15175      Shooter       PC
15176         Misc      PS2
15177       Sports      Wii
15178    Adventure       DS
15179       Racing       PC
15180         Misc       PC
15181       Puzzle      Wii
15182      Shooter       PC
15183     Platform       DS
15184       Sports       PS
15185       Puzzle      3DS
15186    Adventure      PSV
15187    Adventure      PS2
15188     Strategy      PS2
15189    Adventure      PSP
15190       Action      PSP
15191    Adventure      PSP
15192     Fighting       XB
15193    Adventure      PS2
15194    Adventure      PSP
15195       Sports       DS
15196    Adventure      PS3
15197       Action      PSV
15198    Adventure       PC
15199 Role-Playing      3DS
15200 Role-Playing       PC
15201       Action       GC
15202     Strategy       DS
15203       Puzzle      PSP
15204       Puzzle       DS
15205       Action      PSP
15206       Action      PS3
15207    Adventure       DS
15208   Simulation       DS
15209      Shooter      3DS
15210       Racing       PC
15211     Strategy       PC
15212    Adventure      PS2
15213 Role-Playing       PC
15214         Misc       DS
15215    Adventure      PS2
15216       Racing       XB
15217     Strategy      Wii
15218       Sports      Wii
15219      Shooter       PS
15220     Strategy      PSP
15221     Platform       DS
15222       Action       DS
15223    Adventure       PC
15224   Simulation       PC
15225    Adventure      PS3
15226      Shooter       GC
15227     Strategy       PC
15228       Action       DS
15229     Fighting     SNES
15230       Sports      SAT
15231      Shooter       DS
15232       Racing       XB
15233       Sports      Wii
15234    Adventure       PC
15235     Strategy       PC
15236    Adventure      PSP
15237     Strategy       PC
15238       Racing      PS2
15239       Action      PS3
15240     Strategy       PC
15241    Adventure      PSP
15242       Action       PC
15243       Sports       PC
15244      Shooter       PC
15245       Racing       GC
15246   Simulation      PSP
15247      Shooter       PC
15248         Misc      PS2
15249      Shooter      PS4
15250      Shooter      GBA
15251    Adventure      PSP
15252         Misc      Wii
15253    Adventure       PC
15254         Misc     XOne
15255   Simulation       PC
15256         Misc       DS
15257       Sports       DS
15258    Adventure      PSP
15259       Puzzle       XB
15260    Adventure     X360
15261       Action       PC
15262         Misc      SAT
15263    Adventure      PS2
15264         Misc       DS
15265     Strategy       PC
15266    Adventure     X360
15267      Shooter     WiiU
15268    Adventure      PS2
15269       Action      3DS
15270     Platform       GC
15271    Adventure      PS2
15272    Adventure      PSP
15273       Action      PS4
15274     Strategy       PC
15275       Racing      PSP
15276       Racing      PS2
15277 Role-Playing       DS
15278    Adventure       DS
15279    Adventure       PS
15280    Adventure     X360
15281     Strategy       PC
15282 Role-Playing       PC
15283         Misc       DS
15284     Strategy       DS
15285     Fighting       XB
15286 Role-Playing      PS3
15287       Racing      PS2
15288     Strategy       PC
15289 Role-Playing       PC
15290    Adventure       DS
15291         Misc     XOne
15292    Adventure       PS
15293    Adventure      PSV
15294       Action       DS
15295    Adventure      PSP
15296 Role-Playing       PC
15297       Sports       PC
15298       Sports      GBA
15299    Adventure      PS2
15300       Action      PS2
15301       Action       PC
15302         Misc      Wii
15303       Action     X360
15304   Simulation       DS
15305         Misc      GBA
15306 Role-Playing      PS3
15307     Platform       PC
15308    Adventure      PS3
15309 Role-Playing      PSP
15310      Shooter       DS
15311    Adventure      PS2
15312 Role-Playing       PC
15313     Fighting      Wii
15314       Action       DS
15315      Shooter      PS3
15316    Adventure       DS
15317 Role-Playing      GBA
15318    Adventure      PSP
15319    Adventure      PS3
15320    Adventure      SAT
15321       Action      PS3
15322         Misc       PC
15323       Sports      GBA
15324      Shooter       DS
15325    Adventure      PSV
15326     Platform      PSP
15327       Action      PSV
15328    Adventure       DS
15329       Action       PC
15330   Simulation       PC
15331       Action      PSP
15332       Action       XB
15333       Puzzle       DS
15334     Fighting      Wii
15335    Adventure      PSP
15336         Misc      PSP
15337       Sports       DS
15338     Platform      GBA
15339       Sports     X360
15340       Racing      GBA
15341      Shooter       XB
15342         Misc      PS3
15343 Role-Playing       PC
15344       Racing       DS
15345    Adventure       DS
15346       Action     XOne
15347     Strategy       PC
15348   Simulation       PS
15349 Role-Playing      PSP
15350    Adventure       DS
15351     Strategy      PSV
15352       Sports      N64
15353       Puzzle      N64
15354   Simulation       DS
15355     Platform       DS
15356     Strategy      PSP
15357      Shooter     XOne
15358    Adventure       PS
15359    Adventure      PSP
15360 Role-Playing       DS
15361      Shooter       PC
15362     Platform      PS2
15363       Action      PS3
15364    Adventure      Wii
15365       Sports      Wii
15366     Strategy       PC
15367       Racing      Wii
15368       Action       PS
15369       Action      PSV
15370 Role-Playing      PSP
15371       Sports     X360
15372         Misc      PSP
15373   Simulation       PC
15374     Strategy       PC
15375       Racing       XB
15376       Action     XOne
15377       Action      PS4
15378    Adventure      PSP
15379    Adventure       PC
15380 Role-Playing      PSP
15381         Misc      PSP
15382       Action      3DS
15383   Simulation       DS
15384       Action       DS
15385       Action      PSP
15386       Action       PC
15387 Role-Playing      PS3
15388   Simulation       PC
15389       Racing       XB
15390       Sports      PS2
15391       Sports       GC
15392       Action      PS2
15393    Adventure      PSP
15394       Action      PSV
15395     Fighting     WiiU
15396   Simulation       PC
15397 Role-Playing       PC
15398    Adventure      PSP
15399       Action      GBA
15400   Simulation      PS2
15401       Sports      PS2
15402       Action      PSV
15403       Puzzle       DS
15404         Misc      PS3
15405    Adventure      PS3
15406    Adventure      PSP
15407 Role-Playing      PSP
15408   Simulation       PC
15409    Adventure      PSP
15410         Misc       XB
15411       Action      3DS
15412       Racing       PC
15413     Platform      PS2
15414     Strategy      3DS
15415     Strategy       DS
15416 Role-Playing      PS2
15417       Action      PSP
15418   Simulation       PC
15419   Simulation      PSP
15420       Action      3DS
15421   Simulation       DS
15422       Puzzle       DS
15423 Role-Playing      PS3
15424       Action      Wii
15425       Action      PS2
15426   Simulation       PC
15427 Role-Playing       PC
15428       Racing       PC
15429 Role-Playing      GBA
15430    Adventure      PSP
15431     Fighting       XB
15432    Adventure      PS3
15433       Sports      Wii
15434 Role-Playing      PSP
15435    Adventure      PSP
15436    Adventure      PS2
15437       Action      PSV
15438 Role-Playing       PC
15439       Racing       PC
15440     Fighting       PC
15441       Action      PS3
15442       Sports      PS2
15443       Action      PSV
15444       Sports       PS
15445       Action      PS4
15446     Fighting      PSP
15447       Action       PC
15448   Simulation      3DO
15449    Adventure      PSV
15450    Adventure      PSP
15451       Action     XOne
15452       Puzzle      Wii
15453       Puzzle      Wii
15454      Shooter      Wii
15455       Action      PS3
15456      Shooter       PC
15457     Strategy       PC
15458    Adventure      PSV
15459       Puzzle       PC
15460    Adventure      PS2
15461 Role-Playing       PC
15462     Strategy      GBA
15463     Platform       XB
15464 Role-Playing      PSP
15465       Action      PS3
15466       Action     X360
15467       Racing       GC
15468     Platform     XOne
15469         Misc       PC
15470      Shooter       PC
15471       Sports       XB
15472       Sports       PC
15473         Misc      PSP
15474   Simulation       PC
15475   Simulation       DS
15476     Strategy       PS
15477     Strategy       PC
15478     Fighting      PS2
15479      Shooter     X360
15480     Strategy       PC
15481    Adventure      PSP
15482      Shooter       PS
15483       Action     X360
15484         Misc      PSP
15485       Action      PSV
15486 Role-Playing      PS2
15487   Simulation      PS4
15488       Action      PSP
15489      Shooter      PS2
15490      Shooter       PC
15491       Puzzle       DS
15492       Puzzle       PS
15493 Role-Playing      PSP
15494       Racing      Wii
15495   Simulation      PS2
15496         Misc      GBA
15497       Action       GC
15498       Action     WiiU
15499         Misc      3DS
15500         Misc     X360
15501    Adventure     X360
15502    Adventure       DS
15503       Action      PSV
15504         Misc       PC
15505       Action      GBA
15506       Action     XOne
15507    Adventure      PS2
15508         Misc      PS3
15509    Adventure      PS2
15510       Sports       XB
15511       Sports      Wii
15512       Action      PSV
15513       Action     X360
15514       Action      PS3
15515       Action      PSV
15516         Misc      GBA
15517       Action      PSV
15518      Shooter       XB
15519      Shooter       PC
15520       Action      PS3
15521      Shooter     TG16
15522       Action      PS2
15523       Action      GBA
15524   Simulation      PS2
15525       Racing       DS
15526       Action       PS
15527     Strategy      PSP
15528    Adventure      PSP
15529   Simulation       PC
15530       Action      3DS
15531         Misc       DS
15532   Simulation      PS2
15533         Misc       PC
15534    Adventure      PSV
15535    Adventure       XB
15536         Misc       DS
15537       Action      PS3
15538     Strategy       PC
15539    Adventure      PSP
15540    Adventure      PSP
15541       Sports       PC
15542     Strategy      PS2
15543       Sports       NG
15544    Adventure      PSP
15545       Action      3DS
15546         Misc       DS
15547 Role-Playing      Wii
15548       Action       PC
15549     Strategy       PC
15550   Simulation       PC
15551       Puzzle       PC
15552         Misc      PSV
15553    Adventure      GBA
15554    Adventure      PSP
15555         Misc     X360
15556 Role-Playing      PSP
15557       Action      3DS
15558     Strategy       PC
15559       Action       DS
15560     Platform       DS
15561 Role-Playing      PS2
15562 Role-Playing       PC
15563       Action      PSP
15564       Sports       DS
15565    Adventure      PSV
15566   Simulation      Wii
15567      Shooter       PC
15568    Adventure      PS2
15569      Shooter       PC
15570   Simulation       DS
15571       Action       DS
15572       Action       DS
15573         Misc       DS
15574 Role-Playing      PS2
15575    Adventure       DS
15576       Puzzle      PSP
15577         Misc      PSP
15578         Misc      Wii
15579     Strategy       PC
15580       Sports       XB
15581       Sports      PS2
15582       Action       XB
15583      Shooter     X360
15584       Sports       DS
15585     Fighting      PS2
15586         Misc      PSP
15587     Strategy       PC
15588    Adventure      PS2
15589      Shooter       PC
15590      Shooter      PSP
15591       Action      PS2
15592       Action      GBA
15593       Puzzle      PSP
15594       Sports       DS
15595    Adventure      PSP
15596       Action      3DS
15597     Platform       DS
15598    Adventure      PS2
15599    Adventure      PS2
15600    Adventure      PSV
15601       Racing      PS2
15602         Misc       DS
15603       Puzzle      GBA
15604    Adventure      PSP
15605       Puzzle      Wii
15606    Adventure       DS
15607       Racing      Wii
15608   Simulation       DS
15609    Adventure       PC
15610       Action       PS
15611    Adventure       PC
15612    Adventure      PSV
15613 Role-Playing      GBA
15614     Fighting      PS2
15615       Action      3DS
15616     Fighting       XB
15617       Puzzle      GBA
15618       Action      PSP
15619       Action      PS2
15620       Action      PS4
15621      Shooter       XB
15622         Misc      Wii
15623 Role-Playing      PSP
15624       Puzzle      Wii
15625       Puzzle       DS
15626 Role-Playing      PS2
15627       Sports       PC
15628       Action      PS3
15629     Strategy     X360
15630       Action      PSP
15631       Sports       GC
15632       Sports       XB
15633 Role-Playing       PS
15634    Adventure       PC
15635     Platform       DS
15636    Adventure     XOne
15637         Misc      GBA
15638       Sports       DS
15639    Adventure       PC
15640 Role-Playing      PS2
15641       Sports      GBA
15642     Platform      GBA
15643     Strategy      PSP
15644         Misc      PS2
15645       Sports       GC
15646      Shooter      PS2
15647 Role-Playing      PS3
15648         Misc      PS4
15649       Racing      PS2
15650         Misc       DS
15651       Action      Wii
15652       Puzzle       PC
15653       Puzzle       PC
15654       Racing       XB
15655       Racing       GC
15656 Role-Playing      PSP
15657     Platform       GC
15658    Adventure       PC
15659 Role-Playing      PSP
15660       Sports      PS2
15661       Puzzle       DS
15662      Shooter       XB
15663   Simulation       PC
15664       Action      PS3
15665       Action       PC
15666     Strategy       PC
15667 Role-Playing      PSP
15668    Adventure      PSV
15669    Adventure      PSV
15670   Simulation       DS
15671    Adventure      PSP
15672         Misc       DS
15673     Strategy      PS3
15674       Sports     SNES
15675      Shooter       DS
15676       Action      PS4
15677       Puzzle       DS
15678      Shooter      GBA
15679    Adventure      PSP
15680       Action      PSV
15681         Misc      PS2
15682      Shooter       PC
15683       Action      3DS
15684       Racing      Wii
15685       Sports      Wii
15686    Adventure      PSP
15687    Adventure      PSP
15688    Adventure      PS2
15689         Misc      GBA
15690    Adventure      PS2
15691       Sports     X360
15692    Adventure      Wii
15693     Strategy       PC
15694     Strategy      PSP
15695    Adventure      PS2
15696       Action      PS3
15697    Adventure       DS
15698 Role-Playing      PSP
15699     Fighting      PS4
15700         Misc      PS2
15701    Adventure      PS2
15702    Adventure      PSP
15703 Role-Playing       DS
15704     Fighting       PS
15705    Adventure      PSP
15706       Puzzle       DS
15707       Action      PS4
15708      Shooter      Wii
15709    Adventure      PSV
15710       Racing       DS
15711     Strategy       GC
15712       Action       XB
15713       Action      PSP
15714   Simulation      Wii
15715       Action      PSP
15716       Racing       XB
15717      Shooter     X360
15718    Adventure     X360
15719    Adventure       DS
15720       Action      PS3
15721       Action      PSV
15722    Adventure      PSP
15723       Sports      PS4
15724    Adventure      PSV
15725      Shooter     WiiU
15726         Misc       DS
15727       Racing      PSP
15728    Adventure      PSV
15729     Strategy       PC
15730    Adventure      PS2
15731    Adventure      PSP
15732       Racing       DS
15733       Action      PSP
15734      Shooter       XB
15735 Role-Playing       PC
15736       Action       PS
15737    Adventure       PS
15738         Misc       DS
15739   Simulation       PC
15740       Action      Wii
15741     Strategy     X360
15742    Adventure      PSV
15743       Action      GBA
15744    Adventure     XOne
15745   Simulation       DS
15746       Action       DS
15747    Adventure      PS2
15748         Misc      PS4
15749       Puzzle       DS
15750      Shooter       PC
15751       Racing      PS2
15752       Puzzle      PSP
15753 Role-Playing       PC
15754       Action       PC
15755      Shooter       XB
15756    Adventure     X360
15757         Misc       DS
15758    Adventure      PSP
15759       Action       PS
15760    Adventure      PSV
15761       Action      PSV
15762   Simulation      Wii
15763         Misc      PS2
15764       Sports      PS3
15765      Shooter       PC
15766     Strategy       PC
15767    Adventure       PC
15768 Role-Playing      PSP
15769         Misc       DS
15770       Action       PS
15771       Sports       DS
15772       Sports      GBA
15773       Action       PC
15774      Shooter       XB
15775       Action      PS3
15776       Action      PS2
15777      Shooter      PSP
15778       Sports      GBA
15779       Racing       GC
15780    Adventure       DS
15781     Strategy       PC
15782       Puzzle       DS
15783 Role-Playing       DS
15784       Action      PS2
15785    Adventure      PS2
15786       Action      PSP
15787       Action       PC
15788       Action       PC
15789    Adventure      PS2
15790       Puzzle       DS
15791       Action       GC
15792     Platform       DS
15793       Sports      PSV
15794       Action       PC
15795       Action      PSV
15796     Strategy       PC
15797         Misc       DS
15798       Action      PS2
15799       Action      PSP
15800   Simulation       DS
15801       Puzzle     WiiU
15802         Misc       XB
15803         Misc       DS
15804         Misc       DS
15805       Action      PSV
15806     Platform       GC
15807       Puzzle       PC
15808       Action      Wii
15809       Action       DS
15810    Adventure      PS3
15811       Action       DS
15812       Sports      Wii
15813 Role-Playing      PSP
15814         Misc      PS2
15815         Misc       DS
15816    Adventure      PSV
15817    Adventure     X360
15818 Role-Playing      PSV
15819 Role-Playing     X360
15820    Adventure      Wii
15821      Shooter       PC
15822    Adventure      PSV
15823     Strategy       PC
15824         Misc       DS
15825       Sports       DS
15826       Sports      PS3
15827       Action      PS4
15828    Adventure       DS
15829         Misc      PSP
15830      Shooter       PC
15831      Shooter       DS
15832       Action      PS4
15833       Action      3DS
15834         Misc       DS
15835    Adventure      PSP
15836    Adventure      PS2
15837    Adventure       PC
15838    Adventure      PSV
15839     Strategy       DS
15840       Action       DS
15841       Action      PS3
15842       Racing       XB
15843     Platform       PC
15844   Simulation       PC
15845       Action       PC
15846      Shooter      GBA
15847      Shooter      PS2
15848    Adventure      PS2
15849         Misc      PSP
15850         Misc      3DS
15851      Shooter     X360
15852    Adventure      PSV
15853   Simulation       PC
15854    Adventure      PS2
15855       Racing      Wii
15856    Adventure       PC
15857       Action       PC
15858     Strategy       PC
15859       Action      Wii
15860    Adventure       PC
15861       Racing      Wii
15862   Simulation       PC
15863      Shooter       PC
15864     Strategy       PC
15865     Platform       GC
15866    Adventure       DS
15867     Strategy     WiiU
15868    Adventure      PSP
15869      Shooter       GC
15870       Action       DS
15871       Racing       XB
15872    Adventure      PSV
15873       Sports      PSV
15874     Strategy       PC
15875       Action      PS4
15876         Misc      PS4
15877    Adventure      PS2
15878       Action      PSP
15879      Shooter       DC
15880       Action      GBA
15881     Platform      Wii
15882       Action      PSV
15883       Action      PSV
15884     Strategy      PS2
15885       Action       DS
15886    Adventure      PS2
15887      Shooter       PC
15888   Simulation      PSP
15889         Misc      PSP
15890         Misc       DS
15891    Adventure      3DS
15892     Platform      PS2
15893    Adventure      PSP
15894       Action     XOne
15895 Role-Playing      GBA
15896       Sports     XOne
15897     Strategy      PSV
15898         Misc       DS
15899    Adventure      PSP
15900     Platform      GBA
15901       Racing       DS
15902       Racing       PC
15903 Role-Playing      PSP
15904 Role-Playing       DS
15905 Role-Playing      PSP
15906       Action       PC
15907         Misc      PSP
15908     Platform      GBA
15909     Strategy       PC
15910       Racing       DS
15911       Action      PSP
15912         Misc      PSV
15913     Fighting      PS3
15914       Sports       PC
15915    Adventure      PSP
15916       Action     XOne
15917     Strategy       PC
15918       Racing       XB
15919       Action       DS
15920    Adventure      PSV
15921   Simulation       DS
15922   Simulation       PS
15923         Misc       DS
15924       Action      PSP
15925       Sports      Wii
15926       Sports      3DS
15927         Misc      PS2
15928    Adventure      PS3
15929         Misc       DS
15930       Racing      PS2
15931       Action      PS2
15932    Adventure      PSP
15933       Action      PSV
15934       Racing       XB
15935    Adventure     X360
15936    Adventure       DS
15937     Strategy       DS
15938    Adventure      PSP
15939         Misc      PS2
15940       Sports       PC
15941   Simulation      Wii
15942       Action       PC
15943   Simulation       DS
15944   Simulation       DS
15945   Simulation      PS3
15946       Racing     XOne
15947       Racing      PS2
15948    Adventure      PS2
15949       Action      PSP
15950    Adventure      PS2
15951         Misc       PC
15952    Adventure      PSP
15953    Adventure      PSP
15954     Strategy       PC
15955    Adventure      PS2
15956    Adventure      PS4
15957       Racing       GC
15958     Strategy       PC
15959         Misc       DS
15960       Puzzle       DS
15961    Adventure      PSP
15962     Fighting      PSP
15963       Action      GBA
15964     Platform      Wii
15965 Role-Playing      PSP
15966     Platform       PC
15967       Puzzle      PSP
15968     Fighting      PSP
15969    Adventure      PS2
15970       Action      PS2
15971         Misc       DS
15972      Shooter       DS
15973       Sports       DS
15974 Role-Playing       DS
15975    Adventure      PSP
15976    Adventure      PSP
15977    Adventure      PSP
15978     Platform      PSV
15979 Role-Playing       DS
15980      Shooter     X360
15981       Action      PSV
15982     Strategy      PS3
15983         Misc       DS
15984       Action       PC
15985       Action       PC
15986     Strategy       DS
15987       Sports     X360
15988       Racing       PC
15989    Adventure      PSP
15990     Strategy       PC
15991       Action      PS4
15992   Simulation      3DS
15993   Simulation       PC
15994       Action      PSP
15995       Action      Wii
15996         Misc       DS
15997       Sports      GBA
15998       Sports       PC
15999         Misc       DS
16000    Adventure      PSP
16001   Simulation       PC
16002       Sports     XOne
16003    Adventure      PS2
16004     Platform      PS2
16005    Adventure      PSP
16006 Role-Playing       PC
16007    Adventure      PSP
16008      Shooter      PS2
16009       Action       DS
16010    Adventure      PS2
16011         Misc      PS2
16012       Puzzle       GC
16013      Shooter      PS4
16014     Strategy       PC
16015 Role-Playing      PS2
16016    Adventure     X360
16017    Adventure       PC
16018       Action     XOne
16019       Action      PSP
16020       Sports      PSV
16021       Action      3DS
16022       Action      Wii
16023         Misc       DS
16024       Sports      PS3
16025    Adventure      PS2
16026     Strategy       PC
16027       Sports      PS2
16028     Fighting      PS2
16029    Adventure      PS2
16030       Racing      PS2
16031         Misc      PS2
16032 Role-Playing       PC
16033       Action      3DS
16034     Strategy     X360
16035 Role-Playing      PS4
16036      Shooter       PC
16037         Misc      PS2
16038      Shooter       PC
16039 Role-Playing       PC
16040     Fighting      GBA
16041    Adventure       XB
16042         Misc       DS
16043    Adventure      PSV
16044         Misc       PC
16045     Strategy       PC
16046         Misc      GBA
16047       Puzzle       DS
16048       Action      PSV
16049       Racing       DS
16050       Puzzle       DS
16051         Misc      3DS
16052    Adventure     XOne
16053       Sports       DS
16054 Role-Playing       DS
16055       Puzzle       XB
16056       Sports      PS3
16057    Adventure      PSP
16058         Misc     XOne
16059    Adventure      PSP
16060       Action      PS3
16061 Role-Playing      PS3
16062       Racing      GBA
16063    Adventure      PSV
16064       Action     XOne
16065       Sports      Wii
16066    Adventure      PSP
16067       Action       PC
16068    Adventure      PS2
16069    Adventure       DS
16070       Racing       XB
16071       Racing      Wii
16072    Adventure       DS
16073   Simulation       PC
16074       Action      PSP
16075   Simulation       DS
16076         Misc     X360
16077 Role-Playing       PC
16078       Sports       PC
16079       Action       XB
16080    Adventure      PSV
16081         Misc       DS
16082    Adventure      PSP
16083       Racing     SNES
16084     Strategy       PC
16085      Shooter       PC
16086       Sports       DS
16087       Action       DS
16088       Action      PSV
16089         Misc      PS2
16090         Misc       DS
16091    Adventure      PSV
16092     Strategy       PC
16093      Shooter     X360
16094    Adventure      PS2
16095       Action      PSV
16096 Role-Playing      PSV
16097    Adventure      PSP
16098       Sports      PS3
16099       Racing      PS3
16100    Adventure      PSP
16101    Adventure       DS
16102       Action      PSV
16103       Sports      PSP
16104   Simulation      GBA
16105       Action      3DS
16106    Adventure       DS
16107       Sports      PS3
16108       Sports      PS3
16109    Adventure      PSP
16110    Adventure      PS2
16111         Misc      PSP
16112         Misc       DS
16113      Shooter       PS
16114 Role-Playing       DS
16115       Sports       XB
16116   Simulation       PC
16117       Racing       XB
16118   Simulation       PC
16119       Sports      PS3
16120   Simulation       DS
16121       Action       DS
16122       Action       DS
16123       Racing      GBA
16124   Simulation       DS
16125    Adventure      PSP
16126       Action      3DS
16127       Action      Wii
16128     Strategy       PC
16129    Adventure      PS2
16130 Role-Playing     X360
16131    Adventure      PS2
16132       Puzzle       DS
16133    Adventure      PSP
16134    Adventure      PSP
16135     Fighting      PS2
16136    Adventure      PSV
16137     Platform       XB
16138     Platform      PSV
16139    Adventure       DS
16140       Sports       PC
16141    Adventure       XB
16142       Action     XOne
16143    Adventure      PSP
16144   Simulation      PSP
16145    Adventure     WiiU
16146       Puzzle       PC
16147     Strategy       DS
16148       Action      PSV
16149       Action       DS
16150       Action      PSP
16151    Adventure      PSV
16152       Sports      PS3
16153     Fighting      PS2
16154    Adventure      PSV
16155     Strategy       PC
16156         Misc      PSP
16157       Puzzle       PC
16158    Adventure       PC
16159    Adventure      PSP
16160     Fighting      PS2
16161         Misc      PS3
16162    Adventure      PSP
16163         Misc      Wii
16164       Racing      Wii
16165      Shooter      PS2
16166     Platform       DS
16167     Fighting       PS
16168     Fighting      GBA
16169     Strategy      PS2
16170    Adventure      GBA
16171    Adventure     X360
16172       Sports       PC
16173       Action       DS
16174     Strategy       PC
16175       Racing      Wii
16176    Adventure      PSV
16177       Action     WiiU
16178      Shooter     X360
16179    Adventure       DS
16180         Misc      GBA
16181       Racing      GBA
16182       Puzzle       PC
16183    Adventure      PS2
16184       Action      PSP
16185       Puzzle      Wii
16186    Adventure      PS2
16187   Simulation       PC
16188     Platform     X360
16189       Action      Wii
16190       Action      PSP
16191       Action     XOne
16192 Role-Playing       DS
16193       Sports      Wii
16194       Action       PC
16195       Racing      GBA
16196      Shooter      PS3
16197     Fighting       PC
16198    Adventure      PSV
16199    Adventure     XOne
16200       Action      PSV
16201       Action      Wii
16202    Adventure      PS2
16203       Sports       PS
16204       Action       PC
16205       Puzzle       DS
16206       Racing       PC
16207 Role-Playing      PSP
16208       Action       DS
16209    Adventure      PS2
16210       Action      3DS
16211 Role-Playing       PC
16212       Action      PSV
16213     Strategy       PC
16214    Adventure      PSP
16215     Platform      GBA
16216       Puzzle       PC
16217     Strategy       PS
16218 Role-Playing      3DS
16219         Misc      PS3
16220      Shooter       PC
16221       Action       PC
16222       Puzzle      PSV
16223       Action      PSV
16224     Strategy       DS
16225     Fighting      PSP
16226   Simulation       DS
16227 Role-Playing       PC
16228       Action       GC
16229         Misc       DS
16230     Platform      PS3
16231         Misc      Wii
16232     Platform      PSP
16233    Adventure     X360
16234    Adventure      Wii
16235 Role-Playing      PS3
16236       Sports      Wii
16237       Action      PS4
16238       Action       DS
16239     Fighting      PS3
16240    Adventure      PSV
16241         Misc      PS2
16242    Adventure      PSP
16243      Shooter     X360
16244    Adventure      PS2
16245     Strategy      PSP
16246    Adventure      PSV
16247       Puzzle       DS
16248       Action      PSV
16249         Misc      PSP
16250 Role-Playing     WiiU
16251       Sports       PC
16252       Action       DS
16253   Simulation       DS
16254       Racing      GBA
16255         Misc      PS2
16256       Action      PSV
16257    Adventure      PS2
16258     Fighting      PS2
16259         Misc      PS2
16260    Adventure      PSP
16261      Shooter      GBA
16262       Action      PSV
16263       Action     X360
16264    Adventure      PS2
16265       Racing       PC
16266    Adventure      PSP
16267   Simulation     XOne
16268    Adventure      PSP
16269       Sports       GC
16270       Action      PSP
16271      Shooter       PC
16272         Misc      PS2
16273    Adventure      PS4
16274     Strategy      PSP
16275       Action      PSP
16276       Sports       PC
16277       Racing      GBA
16278       Action      PSV
16279         Misc      GBA
16280      Shooter       PC
16281         Misc      Wii
16282      Shooter       GC
16283       Racing       GC
16284    Adventure      PSV
16285      Shooter       PC
16286       Action     WiiU
16287     Strategy      PSP
16288    Adventure       DS
16289    Adventure       DS
16290    Adventure      PSP
16291       Racing       PC
16292    Adventure      3DS
16293     Strategy       PC
16294       Puzzle     WiiU
16295       Puzzle      GBA
16296         Misc       DS
16297   Simulation       PC
16298       Racing       XB
16299     Fighting      PS2
16300 Role-Playing       DS
16301 Role-Playing       DS
16302       Sports      PS4
16303      Shooter      PS2
16304    Adventure      PSP
16305       Puzzle      GBA
16306         Misc       DS
16307    Adventure      PSV
16308    Adventure      Wii
16309    Adventure      PS2
16310       Racing       GC
16311   Simulation       DS
16312    Adventure      PS2
16313         Misc      PS2
16314       Puzzle       DS
16315   Simulation       DS
16316       Action       XB
16317         Misc       PC
16318         Misc      PS2
16319    Adventure      PSP
16320       Action      PSP
16321     Strategy       PC
16322      Shooter       PC
16323       Racing       PC
16324       Sports     X360
16325    Adventure      PSP
16326       Sports       XB
16327     Strategy       PC
16328    Adventure      PSP
16329       Racing       XB
16330       Action       PC
16331       Puzzle       DS
16332       Action      3DS
16333       Action     X360
16334    Adventure      PS2
16335    Adventure      PSP
16336       Action       PC
16337       Action       PC
16338    Adventure      PSP
16339 Role-Playing     X360
16340       Action       XB
16341     Strategy       PS
16342         Misc       DS
16343       Puzzle       XB
16344    Adventure       PC
16345     Strategy      PSP
16346    Adventure      PSP
16347       Sports     X360
16348    Adventure      PS3
16349    Adventure       GC
16350    Adventure      PSV
16351       Action      3DS
16352    Adventure      PS2
16353         Misc       DS
16354    Adventure      PSP
16355       Action       DS
16356         Misc      GBA
16357       Racing       PC
16358         Misc       PC
16359       Action      PS4
16360      Shooter       PC
16361    Adventure      PSP
16362       Action      PSP
16363   Simulation       DS
16364       Racing     X360
16365    Adventure      PS2
16366       Action       DS
16367         Misc       DS
16368     Fighting      PSP
16369       Action      PS4
16370 Role-Playing      PSP
16371     Fighting      PS3
16372    Adventure      PS4
16373    Adventure      PS4
16374       Action      3DS
16375       Racing      Wii
16376    Adventure      PS4
16377       Action      3DS
16378    Adventure     X360
16379       Action     X360
16380     Fighting      PS2
16381       Racing     XOne
16382       Racing       PC
16383         Misc     WiiU
16384       Puzzle      Wii
16385       Racing       PC
16386       Sports       DS
16387    Adventure       DS
16388    Adventure      PS2
16389   Simulation      PS3
16390    Adventure      3DS
16391       Sports       PC
16392    Adventure      PSP
16393     Strategy       PC
16394       Sports       XB
16395 Role-Playing       PC
16396    Adventure      PSV
16397    Adventure      PSP
16398 Role-Playing      PS4
16399    Adventure      PSP
16400       Sports       PC
16401 Role-Playing       DS
16402       Action      PS4
16403    Adventure      PSV
16404    Adventure       PC
16405       Action     XOne
16406       Sports      Wii
16407    Adventure      PSV
16408   Simulation       DS
16409      Shooter       PC
16410       Action     X360
16411       Racing       PC
16412      Shooter     X360
16413       Sports      PS2
16414    Adventure       DS
16415    Adventure      PSP
16416       Action     XOne
16417       Action       PC
16418       Sports      GBA
16419       Racing      PSV
16420    Adventure      PS2
16421       Racing       PC
16422       Racing     X360
16423       Sports       PC
16424    Adventure      PS3
16425   Simulation      PSV
16426       Action      3DS
16427    Adventure      PS2
16428     Fighting      PS2
16429         Misc       DS
16430       Action      PS3
16431       Action      Wii
16432       Action      Wii
16433         Misc      PSV
16434       Sports      3DS
16435       Sports      GBA
16436    Adventure       DS
16437       Puzzle       GC
16438 Role-Playing      PS2
16439    Adventure      PSP
16440       Puzzle       DS
16441     Strategy      PSP
16442 Role-Playing      3DS
16443    Adventure      PS2
16444 Role-Playing       PC
16445       Action      PSP
16446         Misc       DS
16447    Adventure      Wii
16448      Shooter     X360
16449      Shooter       GC
16450       Action      PSV
16451     Strategy       DS
16452 Role-Playing       DS
16453   Simulation      PS3
16454       Action      PSV
16455    Adventure      PSV
16456       Action       PC
16457   Simulation      PS4
16458       Action      PSP
16459    Adventure      Wii
16460         Misc      PSP
16461       Puzzle      Wii
16462       Action     XOne
16463       Racing      PS2
16464         Misc       DS
16465       Action      3DS
16466         Misc      PS2
16467         Misc     XOne
16468       Action      PSP
16469       Action     XOne
16470     Strategy      PSP
16471       Puzzle      3DS
16472       Puzzle      GBA
16473     Platform      GBA
16474      Shooter       PC
16475    Adventure      PSP
16476    Adventure      PSP
16477    Adventure      PS2
16478    Adventure      PS2
16479     Fighting       PS
16480         Misc      3DS
16481    Adventure      PSP
16482    Adventure      3DS
16483     Strategy      PS2
16484         Misc      PSP
16485     Fighting     X360
16486       Action       PC
16487       Puzzle      3DS
16488   Simulation       DS
16489     Strategy       PC
16490    Adventure      PSV
16491 Role-Playing       DS
16492       Action       PC
16493         Misc      PSV
16494       Sports     X360
16495       Action      PSV
16496       Puzzle       PS
16497 Role-Playing      PSP
16498         Misc      Wii
16499       Racing      GBA
16500    Adventure      PS3
16501    Adventure      PS2
16502       Racing     XOne
16503       Action       PC
16504         Misc       DS
16505       Racing      PSP
16506       Puzzle       PC
16507 Role-Playing       DS
16508         Misc       PC
16509    Adventure      PSP
16510       Sports      PS3
16511       Sports      PS3
16512     Strategy       PC
16513    Adventure       DS
16514       Action       DS
16515       Sports     XOne
16516       Action      PSV
16517       Action     XOne
16518    Adventure      PSP
16519       Action     X360
16520       Action      3DS
16521       Puzzle       DS
16522    Adventure       PC
16523 Role-Playing       PC
16524       Action     WiiU
16525       Action      3DS
16526       Action     X360
16527       Sports       PC
16528       Sports       DS
16529    Adventure      PSV
16530       Racing       PC
16531       Action      PSP
16532       Action     XOne
16533       Puzzle       PC
16534       Action      PSV
16535       Action      GBA
16536     Fighting      Wii
16537    Adventure      PS2
16538    Adventure       PS
16539    Adventure      PSV
16540       Action      3DS
16541 Role-Playing      GBA
16542    Adventure      PS2
16543    Adventure      PS2
16544       Action     XOne
16545     Fighting      GBA
16546       Action      PS3
16547       Action       DS
16548       Sports      PS3
16549       Action      3DS
16550     Strategy       PC
16551       Puzzle      PSP
16552       Action      PSV
16553     Strategy       PC
16554    Adventure      PSP
16555    Adventure      PS2
16556    Adventure      PSV
16557   Simulation      Wii
16558       Racing      Wii
16559    Adventure      PSP
16560       Sports      3DS
16561    Adventure      PS2
16562   Simulation       PC
16563       Action      PS3
16564       Action       PC
16565       Sports      N64
16566       Action      N64
16567       Action      GBA
16568      Shooter       PC
16569       Puzzle       GC
16570       Puzzle       DS
16571       Action      PSV
16572       Sports       DS
16573 Role-Playing      PSP
16574     Strategy       PC
16575    Adventure      PSV
16576   Simulation       DS
16577    Adventure       PC
16578      Shooter       GC
16579         Misc      PSV
16580     Platform      GBA
16581       Racing      PS2
16582       Action      PS3
16583       Sports     X360
16584    Adventure      PSV
16585     Platform      GBA
16586   Simulation      PSV
[1] "Genre"
[1] "Platform"

Adding Game Franchises¶

In [ ]:
# Creating franchises
games <- CREATE_FRANCHISES(games)
games_keep_outliers <- CREATE_FRANCHISES(games_keep_outliers)
In [ ]:
# Critics array
critics <- c("UserCount", "CriticCount")

# Column names we want to change and what we want to change them into
column_change <- c(
     "EUSales" = "Europe_sales",
     "NASales" = "NorthernAmerica_sales",
     "JPSales" = "Japan_sales",
     "OtherSale" = "Other_sales")
In [ ]:
#Creating a copy of games for this section
temp_games_bar <- modify_dataset(games, shuffle=TRUE, remove_char_columns=FALSE)

Five most frequent games¶

In [ ]:
# Most frequent games
most_frequent_games(games, 5)
  1. 'The Amazing Spider-Man 2 (2014)'
  2. 'Tomb Raider: Legend'
  3. 'Angry Birds Star Wars'
  4. 'LEGO The Hobbit'
  5. 'Need for Speed: Most Wanted'

BARPLOT: Game frequency over years in database¶

In [ ]:
# Calculating total number of created games per year
temp_games <- cbind(temp_games_bar)
temp_games$Platform <- character_to_class(temp_games, "Platform")$append_column
temp_games <- temp_games %>% group_by(YearofRelease) %>% summarize(sum(Platform))

# Renaming the columns
names(temp_games) <- c("YearOfRelease", "freq")

# Making a barplot of number of games and platforms
barplot(temp_games$freq,
        names.arg = temp_games$YearOfRelease,
        xlab="Platforms",
        ylab="Number of games",
        horiz = FALSE,
        las = 2,
        cex.names = 0.9)
 [1] "DS"   "Wii"  "PS2"  "X360" "XB"   "PS3"  "WiiU" "GC"   "GBA"  "PSP" 
[11] "3DS"  "PS4"  "XOne" "PSV"  "PC"   "PS"   "DC"   "N64" 

BARPLOT: Analysis of platforms with the greatest profit¶

In [ ]:
#Calculating mean values per platform and ordering the df
temp_games <- temp_games_bar %>% group_by(Platform) %>% summarize(mean(GlobalSales))
temp_games <- temp_games[order(temp_games$Platform),]

# Update colum names
names(temp_games) <- c("Platform", "GlobalSales")

# Order df with respect to the global sales value
temp_games <- temp_games %>%               
              as.data.frame() %>% 
              arrange(desc(GlobalSales))

# Plotting the graph
barplot(temp_games$GlobalSales,
        names.arg = temp_games$Platform,
        xlab="Platforms",
        ylab="Normalized Global Revenue",
        horiz = FALSE,
        col="#69b3a2",
        las = 2,
        cex.names = 0.8)

BARPLOT: Analysis of genre with the greastest revenue¶

In [ ]:
#Calculating mean values per platform
temp_games <- temp_games_bar %>% group_by(Genre) %>% summarize(mean(GlobalSales))
temp_games<- temp_games[order(temp_games$Genre),]

# Update colum names
names(temp_games) <- c("Genre", "GlobalSales")

# Order table with respect to global sales value
temp_games <- temp_games %>%                
  as.data.frame() %>% 
  arrange(desc(GlobalSales))

# Barplot of average global sales per genre
barplot(temp_games$GlobalSales,
        names.arg = temp_games$Genre,
        xlab="Genre",
        ylab="Normalized Global Revenue",
        horiz = FALSE,
        col="#69b3a2",
        las = 2,
        cex.names = 0.9)

BARPLOT: Analysis of ratings with the greatest revenue¶

In [ ]:
#Calculating mean values per platform
temp_games <- temp_games_bar %>% group_by(Rating) %>% summarize(mean(GlobalSales))
# temp_games<- temp_games[order(temp_games$Genre),]

# Update colum names
names(temp_games) <- c("Rating", "GlobalSales")

#Replacing NA values with "N/A"
temp_games$Rating[is.na(temp_games$Rating)] <- "N/A"

# Order table with respect to global sales value
temp_games <- temp_games %>%                
  as.data.frame() %>% 
  arrange(desc(GlobalSales))

# Barplot of the mean sales per rating
barplot(temp_games$GlobalSales,
        names.arg = temp_games$Rating,
        xlab="Rating",
        ylab="Normalized Global Revenue",
        horiz = FALSE,
        col="#69b3a2",
        las = 2,
        cex.names = 0.8)

Linear Regression¶

Creating Test/Train datasets

In [ ]:
to_be_removed <- c("UserCount", "CriticCount", "UserScore", "CriticScore")

# Create train and test datasets
games_analysis <- cbind(games)

# Appending 'N/A' to missing values of Rating,Genre,Platform,
# because it has to be converted into classes
games_analysis$Rating[is.na(games_analysis$Rating)] <- 'NA' 
games_analysis$Genre[is.na(games_analysis$Genre)] <- 'NA'
games_analysis$Platform[is.na(games_analysis[,"Platform"])] <- 'NA'

# function character_to_class returns us a dict and new column to be 
# replaced, thus we will save both in case we need it later
results_genre <- character_to_class(games_analysis, "Genre")
games_analysis$Genre <- results_genre$append_column

results_platform <- character_to_class(games_analysis, "Platform")
games_analysis$Platform <- results_platform$append_column

results_rating <- character_to_class(games_analysis, "Rating")
games_analysis$Rating <- results_rating$append_column

# Shufffling the dataset, removing character columns angames_analysisd removing unnecessary columns
games_analysis <- modify_dataset(games_analysis, shuffle=TRUE, remove_char_columns=TRUE, remove_col=to_be_removed, dict_rename_col=NA)

# Splitting the dataset
training_boundary <- round(nrow(games_analysis)*(DATASET_SPLIT))

# Creating TEST/TRAIN dataset
train_set <- games_analysis[1:training_boundary, ]
test_set <- games_analysis[-(1:training_boundary), ]
 [1] "Misc"         "Action"       "Simulation"   "Fighting"     "Puzzle"      
 [6] "Sports"       "Role-Playing" "Racing"       "Platform"     "Shooter"     
[11] "Adventure"    "Strategy"    
 [1] "DS"   "Wii"  "PS2"  "X360" "XB"   "PS3"  "WiiU" "GC"   "GBA"  "PSP" 
[11] "3DS"  "PS4"  "XOne" "PSV"  "PC"   "PS"   "DC"   "N64" 
[1] "E"    "E10+" "T"    "M"    NA     "EC"  

LINEAR CLASSIFIER: Franchise - GlobalSales¶

In [ ]:
#Columns that need to be removed
to_be_removed <- c("NASales", "EUSales", "JPSales", "OtherSales", "UserScore", "CriticScore")

#Creating a customized train/test DFs
train_set_global_sales <- train_set[,!names(train_set) %in% to_be_removed]
test_set_global_sales <- test_set[,!names(test_set) %in% to_be_removed]
In [ ]:
threshold<-mean(train_set_global_sales$inFranchise)
# threshold<-mean(train_set_global_sales$GlobalSales[train_set_global_sales$inFranchise==1])

logisticModel <- NscatterPlotLogisticRegression(dataset=train_set_global_sales,
                                             outputName="inFranchise",
                                             predictorName="GlobalSales",
                                             threshold=threshold)

Confusion matrix and ROC Curve¶

In [ ]:
# Calculating the confusion matrix of the logistic model
confusion <- Npredict(dataset=train_set_global_sales, outputName="GlobalSales", predictorName="inFranchise",  logisticModel = logisticModel)
print("TRAIN DATASET RESULTS")
print(confusion)
print(NcalcConfusion(confusion))
Call:  glm(formula = formular, family = quasibinomial, data = dframe)

Coefficients:
(Intercept)            x  
     -1.095        1.591  

Degrees of Freedom: 7582 Total (i.e. Null);  7581 Residual
Null Deviance:	    9560 
Residual Deviance: 9334 	AIC: NA
[1] "TRAIN DATASET RESULTS"
              actualClass
predictedClass FALSE TRUE
         FALSE  4602  519
         TRUE   1993  469
Warning message in (TP + FP) * (TP + FN) * (TN + FP):
“NAs produced by integer overflow”
$TP
[1] 469

$FN
[1] 519

$TN
[1] 4602

$FP
[1] 1993

$accuracy
[1] 66.87327

$pgood
[1] 19.04955

$pbad
[1] 89.86526

$FPR
[1] 30.21986

$TPR
[1] 47.46964

$mcc
[1] NA

In [ ]:
# Getting the predictor and the output
x <- train_set$inFranchise
y <- train_set$GlobalSales

# Plotting a ROC curve
data <- data.frame(x,y)
data<-data.frame(x,y)
names(data)<-c("yes","no")
roc.plot(data$yes, data$no)
In [ ]:
#Making a copy of games
gamesForLinear <- cbind(games)

#Replacing NA values with 0
gamesForLinear$Rating[is.na(gamesForLinear$Rating)] <- "NA" 

# One-hot encoding columns
gamesForLinear <- hot_encode(gamesForLinear, c("Genre", "Platform", "Rating"))

# Shuffling the dataset
gamesForLinear <- gamesForLinear[sample(1:nrow(gamesForLinear)), ]

# Removing an outlier that was noticed during the linear regression testing
# gamesForLinear <- gamesForLinear %>% filter(Name != "ColinMcRae Rally 2.0")

# Remove User and Critic Count from the dataset
gamesForLinear<-gamesForLinear %>% 
               select(-UserCount,-CriticCount,-UserScore,-CriticScore,-GenrePlatform)

# Remove all the character fields from the dataset for Linear regression training
gamesForLinear<-gamesForLinear[, sapply(gamesForLinear, class) != 'character']

# Change column names to the desired ones
gamesForLinear <- alterDataframeNames(gamesForLinear, column_change)

# Splitting the dataset
training_boundary <- round(nrow(gamesForLinear)*(DATASET_SPLIT))

# Creating a train and test dataset
train_set <- gamesForLinear[1:training_boundary, ]
test_set <- gamesForLinear[-(1:training_boundary), ]

print(nrow(train_set))
print(nrow(test_set))
[1] "Genre"
[1] "Platform"
[1] "Rating"
[1] 7583
[1] 3250
In [ ]:
## Adding "Other" to the REGIONS variable and removing the spacings
regions <- cbind(REGIONS)
regions <- rbind(regions, "Other")
regions <- as.vector(
  apply(regions, 2, function(x) gsub("\\s+", "", x))
)
        
regions
  1. 'NorthernAmerica'
  2. 'Japan'
  3. 'Europe'
  4. 'Other'
In [ ]:
# Creating an empty matrix where regions and r^2 will be appended
r2_regions <- data.frame(matrix(ncol = 2, nrow = 0))
# Changing the names of the columns
names <- c("region", "r^2")
colnames(r2_regions) <- names

# Iterating through each of the regions
for(region in regions){
    # Make a copy of the train set without Global Sales
    tmp <- cbind(train_set[which(names(train_set)!="GlobalSales")])
    
    print(region)
    
    # Remove all the columns that belong to other regions
    remove_reg <- regions[which(regions != region)]
    matchExpression <- paste(remove_reg, collapse ="|")
    tmp <- tmp %>% select(-matches(matchExpression))
    
    # Get the output sales for that region
    output <- paste(region, "sales", sep="_")
    
    # Transforming the output
    tmp[, output]<- log(tmp[, output] + 0.01)
    
    formula <- paste0(output,'~.-(RatingNA)')
    
    # Training a linear model    
    linearModelPerRegion <- lm(formula, data=tmp)  
    
    #This calculates the r squared value - a measure of fit
    r2<-round(Nr2(linearModelPerRegion),digits=2)
    print(paste("Calculated r^2 with all variables added=",r2))

    # Saving the r^2 for this region
    r2_regions <- appendToDataframe(r2_regions, c(region,r2))
    
    
    # Use caret library to determine scaled "importance"
    importance<-as.data.frame(caret::varImp(linearModelPerRegion, scale = TRUE))
    
    # Get the most "important" values in order
    importance <- importance[rev(order(importance$Overall))[1:10],,drop=FALSE]
    print(importance)

    
    # Plot the % importance ordered from lowest to highest
    barplot(t(importance))
}
[1] "NorthernAmerica"
[1] "Calculated r^2 with all variables added= 0.44"
                 Overall
RatingE        41.171621
RatingT        36.626419
RatingE10.     32.650598
RatingM        29.915598
PlatformPC     13.970959
PlatformPSP     8.531580
inFranchise     8.364742
GenreAdventure  7.862843
PlatformPS2     7.702592
PlatformPSV     7.276677
[1] "Japan"
[1] "Calculated r^2 with all variables added= 0.37"
                    Overall
RatingE           31.261442
RatingE10.        24.873821
RatingT           21.506573
GenreRole.Playing 15.801414
RatingM           13.997905
inFranchise       10.115729
PlatformPSV        7.523575
PlatformPSP        7.421424
Platform3DS        7.263764
GenreFighting      6.856617
[1] "Europe"
[1] "Calculated r^2 with all variables added= 0.28"
                    Overall
RatingM           20.067679
RatingT           19.588053
RatingE10.        16.276154
RatingE           14.749227
Europe_ageMedian  10.424925
YearofRelease      9.527940
GenreAdventure     8.829334
PlatformPSP        8.021724
GenreRole.Playing  7.595756
PlatformDS         7.545147
[1] "Other"
[1] "Calculated r^2 with all variables added= 0.33"
                 Overall
RatingE        27.946837
RatingT        27.764379
RatingM        25.218943
RatingE10.     24.797106
PlatformGBA     9.521094
PlatformGC      9.341778
inFranchise     9.121338
PlatformXB      8.654070
GenreAdventure  8.106411
PlatformPC      6.375653
In [ ]:
# Making a copy of the train set to train a linear model on the global sales
tmp <- cbind(train_set)
# Transforming the global sales by using logarithmic function
tmp[, "GlobalSales"]<- log(train_set[, "GlobalSales"] + 0.01)

# Removing other sales from training
formula <- paste0("GlobalSales",'~.-(Japan_sales + NorthernAmerica_sales + Europe_sales + Other_sales + RatingNA)')

# Training a linear model
linearModel <- lm(formula, data=tmp)  

# Calculating R^2
r2<-round(Nr2(linearModel),digits=2)
print(paste("Calculated r^2 with all variables added=",r2))

# Use caret library to determine scaled "importance"
importance<-as.data.frame(caret::varImp(linearModel, scale = TRUE))

# Printing the importance of different variables
print(importance[rev(order(importance$Overall))[1:10],,drop=FALSE])
[1] "Calculated r^2 with all variables added= 0.23"
                 Overall
RatingM        17.700132
RatingT        17.457750
RatingE        17.292023
inFranchise    15.767525
RatingE10.     15.378774
PlatformPC      9.232321
GenreAdventure  9.048181
PlatformXB      5.942374
PlatformGBA     5.715536
PlatformGC      5.599921
In [ ]:
# Iterate through regions
for (region in regions) {
    # Set the output to be the sales from the current region
    output <- paste0(region, "_sales")
    
    # Setting the predictor to the region's gender ratio and training a linear model
    femalePredictor <- paste0(region,"_femaleRatioMedian")
    linearRegressionPlotPredict(train_set, test_set, femalePredictor, output)
    
    # Setting the predictor to the region's age median and training a linear model
    agePredictor <- paste0(region,"_ageMedian")
    linearRegressionPlotPredict(train_set, test_set, agePredictor, output)
}
Warning message:
“`group_by_()` was deprecated in dplyr 0.7.0.
ℹ Please use `group_by()` instead.
ℹ See vignette('programming') for more help
ℹ The deprecated feature was likely used in the dplyr package.
  Please report the issue at <https://github.com/tidyverse/dplyr/issues>.”
[1] "NorthernAmerica_sales"             "NorthernAmerica_femaleRatioMedian"
[1] "NorthernAmerica_sales"     "NorthernAmerica_ageMedian"
[1] "Japan_sales"             "Japan_femaleRatioMedian"
[1] "Japan_sales"     "Japan_ageMedian"
[1] "Europe_sales"             "Europe_femaleRatioMedian"
[1] "Europe_sales"     "Europe_ageMedian"
[1] "Other_sales"             "Other_femaleRatioMedian"
[1] "Other_sales"     "Other_ageMedian"

Clustering¶

In [ ]:
#Make a copy of games for clustering
gamesForClustering <- subset(games, select = -c(CriticScore, UserScore, CriticCount, UserCount))

#Encode ordered rating
gamesForClustering <- gamesForClustering[complete.cases(gamesForClustering$Rating),]
orderedRating<-c("E","EC","E10+","T", "M")
gamesForClustering<-NPREPROCESSING_encodeOrderedSymbols(gamesForClustering, 'Rating', orderedRating)
#Encode categorical columns
catagoricalColumns <- c("Genre", "Platform")
catagoricalReadyforClustering<-NPREPROCESSING_categorical(gamesForClustering[,catagoricalColumns])
gamesForClustering<-cbind(subset(gamesForClustering, select = -c(Genre, Platform)), catagoricalReadyforClustering)

#Remove NA's and keep only numeric fields for clustering
clustering_dataset<-gamesForClustering[complete.cases(gamesForClustering),]
clustering_dataset<-dplyr::select_if(clustering_dataset, is.numeric)
[1] "Genre"
[1] "Platform"
In [ ]:
genres <- c('GenreAction','GenreAdventure','GenreFighting',
'GenreMisc','GenrePlatform','GenrePuzzle','GenreRacing',
'GenreRole.Playing','GenreShooter','GenreSimulation','GenreSports',
'GenreStrategy')

KMeans¶

In [ ]:
genreKmeansClustering(clustering_dataset, genres, gamesForClustering)
[1] "Optimal Number of Clusters found Through Silhouette Index: 3"
[1] "Summary for: GenreAction"
[1] "*******************************************"
[1] "Clus= 1"
[1] "Total number of games in cluster: 599"
[1] "Average Global Sales: 0.655916723951684"
[1] "Percentages:"
[1] "High global sales: 0 %"
[1] "High NA sales: 0 %"
[1] "High JP sales: 0.333889816360601 %"
[1] "High EU sales: 0.333889816360601 %"
[1] "High Other sales: 1.83639398998331 %"
[1] "Games in franchise with high sales: 0 %"
[1] "Games in franchise: 45.2420701168614 %"
[1] "Percentage of high selling games ratings:"
[1] "E: 39.0651085141903 %"
[1] "EC: 0 %"
[1] "E10+: 15.5258764607679 %"
[1] "T: 28.3806343906511 %"
[1] "M: 17.0283806343907 %"
[1] "Platform Frequencies of High Sale Games:"
data frame with 0 columns and 0 rows
[1] "Platform Frequencies"
     Platform3DS PlatformDS PlatformGBA PlatformGC PlatformPC PlatformPS2
4177          13         70          33         17         22         107
     PlatformPS3 PlatformPS4 PlatformPSP PlatformPSV PlatformWii PlatformWiiU
4177          83           5          29           7          68            5
     PlatformX360 PlatformXB PlatformXOne
4177           85         47            8
[1] "------------------------------------------"
[1] "Clus= 2"
[1] "Total number of games in cluster: 257"
[1] "Average Global Sales: 0.888853284504463"
[1] "Percentages:"
[1] "High global sales: 45.136186770428 %"
[1] "High NA sales: 4.28015564202335 %"
[1] "High JP sales: 0.778210116731518 %"
[1] "High EU sales: 1.16731517509728 %"
[1] "High Other sales: 5.83657587548638 %"
[1] "Games in franchise with high sales: 24.5136186770428 %"
[1] "Games in franchise: 47.4708171206226 %"
[1] "Percentage of high selling games ratings:"
[1] "E: 36.5758754863813 %"
[1] "EC: 0 %"
[1] "E10+: 11.6731517509728 %"
[1] "T: 31.1284046692607 %"
[1] "M: 20.6225680933852 %"
[1] "Platform Frequencies of High Sale Games:"
     Platform3DS PlatformDS PlatformGBA PlatformGC PlatformPS2 PlatformPS3
2632           2         12           3          6          16          25
     PlatformPSP PlatformPSV PlatformWii PlatformWiiU PlatformX360 PlatformXB
2632           2           1          15            1           26          6
     PlatformXOne
2632            1
[1] "Platform Frequencies"
     Platform3DS PlatformDS PlatformGBA PlatformGC PlatformPC PlatformPS2
3166           5         29          14         11          9          29
     PlatformPS3 PlatformPS4 PlatformPSP PlatformPSV PlatformWii PlatformWiiU
3166          50           3           9           1          26            3
     PlatformX360 PlatformXB PlatformXOne
3166           51         15            2
[1] "------------------------------------------"
[1] "Clus= 3"
[1] "Total number of games in cluster: 197"
[1] "Average Global Sales: 0.705344879068379"
[1] "Percentages:"
[1] "High global sales: 8.12182741116751 %"
[1] "High NA sales: 1.52284263959391 %"
[1] "High JP sales: 0.50761421319797 %"
[1] "High EU sales: 0 %"
[1] "High Other sales: 2.03045685279188 %"
[1] "Games in franchise with high sales: 6.09137055837564 %"
[1] "Games in franchise: 54.3147208121827 %"
[1] "Percentage of high selling games ratings:"
[1] "E: 40.6091370558376 %"
[1] "EC: 0 %"
[1] "E10+: 16.751269035533 %"
[1] "T: 27.9187817258883 %"
[1] "M: 14.7208121827411 %"
[1] "Platform Frequencies of High Sale Games:"
     PlatformDS PlatformGC PlatformPS2 PlatformPS3 PlatformWii PlatformX360
2625          1          1           3           5           4            2
[1] "Platform Frequencies"
     Platform3DS PlatformDS PlatformGBA PlatformGC PlatformPC PlatformPS2
4164           7         14           7          8          3          37
     PlatformPS3 PlatformPSP PlatformPSV PlatformWii PlatformWiiU PlatformX360
4164          32           8           3          35            3           25
     PlatformXB PlatformXOne
4164         14            1
[1] "------------------------------------------"
[1] "Optimal Number of Clusters found Through Silhouette Index: 2"
[1] "Summary for: GenreAdventure"
[1] "*******************************************"
[1] "Clus= 1"
[1] "Total number of games in cluster: 111"
[1] "Average Global Sales: 0.905458399576047"
[1] "Percentages:"
[1] "High global sales: 53.1531531531532 %"
[1] "High NA sales: 7.20720720720721 %"
[1] "High JP sales: 0 %"
[1] "High EU sales: 0 %"
[1] "High Other sales: 5.40540540540541 %"
[1] "Games in franchise with high sales: 28.8288288288288 %"
[1] "Games in franchise: 51.3513513513513 %"
[1] "Percentage of high selling games ratings:"
[1] "E: 40.5405405405405 %"
[1] "EC: 0 %"
[1] "E10+: 10.8108108108108 %"
[1] "T: 27.027027027027 %"
[1] "M: 21.6216216216216 %"
[1] "Platform Frequencies of High Sale Games:"
     Platform3DS PlatformDS PlatformGC PlatformPS2 PlatformPS3 PlatformPSP
2632           1          7          4           9          12           2
     PlatformWii PlatformWiiU PlatformX360 PlatformXB
2632           8            1           10          5
[1] "Platform Frequencies"
     Platform3DS PlatformDS PlatformGBA PlatformGC PlatformPC PlatformPS2
2904           4         13           3          5          1          15
     PlatformPS3 PlatformPSP PlatformWii PlatformWiiU PlatformX360 PlatformXB
2904          19           6          15            2           19          9
[1] "------------------------------------------"
[1] "Clus= 2"
[1] "Total number of games in cluster: 172"
[1] "Average Global Sales: 0.891586867305062"
[1] "Percentages:"
[1] "High global sales: 42.4418604651163 %"
[1] "High NA sales: 3.48837209302326 %"
[1] "High JP sales: 0.581395348837209 %"
[1] "High EU sales: 1.16279069767442 %"
[1] "High Other sales: 5.81395348837209 %"
[1] "Games in franchise with high sales: 25 %"
[1] "Games in franchise: 48.2558139534884 %"
[1] "Percentage of high selling games ratings:"
[1] "E: 35.4651162790698 %"
[1] "EC: 0 %"
[1] "E10+: 12.7906976744186 %"
[1] "T: 31.3953488372093 %"
[1] "M: 20.3488372093023 %"
[1] "Platform Frequencies of High Sale Games:"
     Platform3DS PlatformDS PlatformGBA PlatformGC PlatformPS2 PlatformPS3
2630           1          6           3          3          10          18
     PlatformPSV PlatformWii PlatformX360 PlatformXB PlatformXOne
2630           1          11           18          1            1
[1] "Platform Frequencies"
     Platform3DS PlatformDS PlatformGBA PlatformGC PlatformPC PlatformPS2
2906           2         19           9          7          6          19
     PlatformPS3 PlatformPS4 PlatformPSP PlatformPSV PlatformWii PlatformWiiU
2906          37           2           4           1          21            3
     PlatformX360 PlatformXB PlatformXOne
2906           33          8            1
[1] "------------------------------------------"
[1] "Optimal Number of Clusters found Through Silhouette Index: 2"
[1] "Summary for: GenreFighting"
[1] "*******************************************"
[1] "Clus= 1"
[1] "Total number of games in cluster: 132"
[1] "Average Global Sales: 0.90632798573975"
[1] "Percentages:"
[1] "High global sales: 56.8181818181818 %"
[1] "High NA sales: 4.54545454545455 %"
[1] "High JP sales: 0 %"
[1] "High EU sales: 1.51515151515152 %"
[1] "High Other sales: 4.54545454545455 %"
[1] "Games in franchise with high sales: 36.3636363636364 %"
[1] "Games in franchise: 50 %"
[1] "Percentage of high selling games ratings:"
[1] "E: 32.5757575757576 %"
[1] "EC: 0 %"
[1] "E10+: 15.1515151515152 %"
[1] "T: 31.0606060606061 %"
[1] "M: 21.2121212121212 %"
[1] "Platform Frequencies of High Sale Games:"
     Platform3DS PlatformDS PlatformGBA PlatformGC PlatformPS2 PlatformPS3
2632           1          9           1          5          11          12
     PlatformPSP PlatformPSV PlatformWii PlatformX360 PlatformXB PlatformXOne
2632           2           1           9           20          3            1
[1] "Platform Frequencies"
     Platform3DS PlatformDS PlatformGBA PlatformGC PlatformPC PlatformPS2
2750           4         18           4          5          1          17
     PlatformPS3 PlatformPS4 PlatformPSP PlatformPSV PlatformWii PlatformWiiU
2750          20           1           6           1          19            1
     PlatformX360 PlatformXB PlatformXOne
2750           28          6            1
[1] "------------------------------------------"
[1] "Clus= 2"
[1] "Total number of games in cluster: 57"
[1] "Average Global Sales: 0.976676986584107"
[1] "Percentages:"
[1] "High global sales: 100 %"
[1] "High NA sales: 14.0350877192982 %"
[1] "High JP sales: 0 %"
[1] "High EU sales: 0 %"
[1] "High Other sales: 8.7719298245614 %"
[1] "Games in franchise with high sales: 47.3684210526316 %"
[1] "Games in franchise: 47.3684210526316 %"
[1] "Percentage of high selling games ratings:"
[1] "E: 36.8421052631579 %"
[1] "EC: 0 %"
[1] "E10+: 10.5263157894737 %"
[1] "T: 29.8245614035088 %"
[1] "M: 22.8070175438596 %"
[1] "Platform Frequencies of High Sale Games:"
     Platform3DS PlatformDS PlatformGBA PlatformGC PlatformPS2 PlatformPS3
2500           1          4           2          2           8          18
     PlatformWii PlatformWiiU PlatformX360 PlatformXB
2500          10            1            8          3
[1] "Platform Frequencies"
     Platform3DS PlatformDS PlatformGBA PlatformGC PlatformPS2 PlatformPS3
2500           1          4           2          2           8          18
     PlatformWii PlatformWiiU PlatformX360 PlatformXB
2500          10            1            8          3
[1] "------------------------------------------"
[1] "Optimal Number of Clusters found Through Silhouette Index: 4"
[1] "Summary for: GenreMisc"
[1] "*******************************************"
[1] "Clus= 1"
[1] "Total number of games in cluster: 66"
[1] "Average Global Sales: 0.938146167557932"
[1] "Percentages:"
[1] "High global sales: 89.3939393939394 %"
[1] "High NA sales: 12.1212121212121 %"
[1] "High JP sales: 0 %"
[1] "High EU sales: 0 %"
[1] "High Other sales: 7.57575757575758 %"
[1] "Games in franchise with high sales: 57.5757575757576 %"
[1] "Games in franchise: 60.6060606060606 %"
[1] "Percentage of high selling games ratings:"
[1] "E: 37.8787878787879 %"
[1] "EC: 0 %"
[1] "E10+: 12.1212121212121 %"
[1] "T: 24.2424242424242 %"
[1] "M: 25.7575757575758 %"
[1] "Platform Frequencies of High Sale Games:"
     Platform3DS PlatformDS PlatformGBA PlatformGC PlatformPS2 PlatformPS3
2623           2          7           1          1           8          12
     PlatformPSP PlatformPSV PlatformWii PlatformX360 PlatformXB PlatformXOne
2623           2           1           8           13          3            1
[1] "Platform Frequencies"
     Platform3DS PlatformDS PlatformGBA PlatformGC PlatformPS2 PlatformPS3
2691           2          8           2          1           8          12
     PlatformPSP PlatformPSV PlatformWii PlatformX360 PlatformXB PlatformXOne
2691           2           1           8           17          4            1
[1] "------------------------------------------"
[1] "Clus= 2"
[1] "Total number of games in cluster: 227"
[1] "Average Global Sales: 0.781186835967867"
[1] "Percentages:"
[1] "High global sales: 0 %"
[1] "High NA sales: 0 %"
[1] "High JP sales: 1.3215859030837 %"
[1] "High EU sales: 0.881057268722467 %"
[1] "High Other sales: 4.40528634361234 %"
[1] "Games in franchise with high sales: 0 %"
[1] "Games in franchise: 43.1718061674009 %"
[1] "Percentage of high selling games ratings:"
[1] "E: 37.4449339207048 %"
[1] "EC: 0 %"
[1] "E10+: 13.215859030837 %"
[1] "T: 33.4801762114537 %"
[1] "M: 15.8590308370044 %"
[1] "Platform Frequencies of High Sale Games:"
data frame with 0 columns and 0 rows
[1] "Platform Frequencies"
     Platform3DS PlatformDS PlatformGBA PlatformGC PlatformPC PlatformPS2
3339           9         20          19          8         12          32
     PlatformPS3 PlatformPS4 PlatformPSP PlatformPSV PlatformWii PlatformWiiU
3339          36           5           9           2          16            4
     PlatformX360 PlatformXB PlatformXOne
3339           32         19            4
[1] "------------------------------------------"
[1] "Clus= 3"
[1] "Total number of games in cluster: 64"
[1] "Average Global Sales: 0.959007352941176"
[1] "Percentages:"
[1] "High global sales: 100 %"
[1] "High NA sales: 9.375 %"
[1] "High JP sales: 0 %"
[1] "High EU sales: 1.5625 %"
[1] "High Other sales: 6.25 %"
[1] "Games in franchise with high sales: 46.875 %"
[1] "Games in franchise: 46.875 %"
[1] "Percentage of high selling games ratings:"
[1] "E: 31.25 %"
[1] "EC: 0 %"
[1] "E10+: 12.5 %"
[1] "T: 34.375 %"
[1] "M: 21.875 %"
[1] "Platform Frequencies of High Sale Games:"
     PlatformDS PlatformGBA PlatformGC PlatformPS2 PlatformPS3 PlatformWii
2615          6           1          5          10          15          11
     PlatformWiiU PlatformX360 PlatformXB
2615            1           12          3
[1] "Platform Frequencies"
     PlatformDS PlatformGBA PlatformGC PlatformPS2 PlatformPS3 PlatformWii
2615          6           1          5          10          15          11
     PlatformWiiU PlatformX360 PlatformXB
2615            1           12          3
[1] "------------------------------------------"
[1] "Clus= 4"
[1] "Total number of games in cluster: 187"
[1] "Average Global Sales: 0.791884240327147"
[1] "Percentages:"
[1] "High global sales: 4.81283422459893 %"
[1] "High NA sales: 0 %"
[1] "High JP sales: 1.06951871657754 %"
[1] "High EU sales: 1.06951871657754 %"
[1] "High Other sales: 3.74331550802139 %"
[1] "Games in franchise with high sales: 3.74331550802139 %"
[1] "Games in franchise: 49.1978609625668 %"
[1] "Percentage of high selling games ratings:"
[1] "E: 34.7593582887701 %"
[1] "EC: 0 %"
[1] "E10+: 16.5775401069519 %"
[1] "T: 28.8770053475936 %"
[1] "M: 19.7860962566845 %"
[1] "Platform Frequencies of High Sale Games:"
     PlatformGBA PlatformGC PlatformPS2 PlatformPS3 PlatformX360
2632           1          1           1           3            3
[1] "Platform Frequencies"
     Platform3DS PlatformDS PlatformGBA PlatformGC PlatformPC PlatformPS2
3333           1         18          10          8          7          25
     PlatformPS3 PlatformPSP PlatformPSV PlatformWii PlatformWiiU PlatformX360
3333          38          11           1          26            3           26
     PlatformXB PlatformXOne
3333         11            2
[1] "------------------------------------------"
[1] "Optimal Number of Clusters found Through Silhouette Index: 4"
[1] "Summary for: GenrePlatform"
[1] "*******************************************"
[1] "Clus= 1"
[1] "Total number of games in cluster: 34"
[1] "Average Global Sales: 0.970588235294118"
[1] "Percentages:"
[1] "High global sales: 100 %"
[1] "High NA sales: 23.5294117647059 %"
[1] "High JP sales: 0 %"
[1] "High EU sales: 0 %"
[1] "High Other sales: 11.7647058823529 %"
[1] "Games in franchise with high sales: 38.2352941176471 %"
[1] "Games in franchise: 38.2352941176471 %"
[1] "Percentage of high selling games ratings:"
[1] "E: 38.2352941176471 %"
[1] "EC: 0 %"
[1] "E10+: 8.82352941176471 %"
[1] "T: 32.3529411764706 %"
[1] "M: 20.5882352941176 %"
[1] "Platform Frequencies of High Sale Games:"
     PlatformDS PlatformGBA PlatformGC PlatformPS2 PlatformPS3 PlatformWii
2513          1           2          1           6           9           7
     PlatformX360 PlatformXB
2513            5          3
[1] "Platform Frequencies"
     PlatformDS PlatformGBA PlatformGC PlatformPS2 PlatformPS3 PlatformWii
2513          1           2          1           6           9           7
     PlatformX360 PlatformXB
2513            5          3
[1] "------------------------------------------"
[1] "Clus= 2"
[1] "Total number of games in cluster: 68"
[1] "Average Global Sales: 0.899826989619377"
[1] "Percentages:"
[1] "High global sales: 51.4705882352941 %"
[1] "High NA sales: 1.47058823529412 %"
[1] "High JP sales: 0 %"
[1] "High EU sales: 0 %"
[1] "High Other sales: 5.88235294117647 %"
[1] "Games in franchise with high sales: 35.2941176470588 %"
[1] "Games in franchise: 50 %"
[1] "Percentage of high selling games ratings:"
[1] "E: 27.9411764705882 %"
[1] "EC: 0 %"
[1] "E10+: 10.2941176470588 %"
[1] "T: 30.8823529411765 %"
[1] "M: 30.8823529411765 %"
[1] "Platform Frequencies of High Sale Games:"
     Platform3DS PlatformDS PlatformGC PlatformPS2 PlatformPS3 PlatformPSV
2630           1          2          3           7          10           1
     PlatformWii PlatformX360 PlatformXB
2630           2            7          2
[1] "Platform Frequencies"
     Platform3DS PlatformDS PlatformGBA PlatformGC PlatformPC PlatformPS2
2775           2          8           3          3          1           8
     PlatformPS3 PlatformPSP PlatformPSV PlatformWii PlatformWiiU PlatformX360
2775          15           3           1           4            1           14
     PlatformXB
2775          5
[1] "------------------------------------------"
[1] "Clus= 3"
[1] "Total number of games in cluster: 34"
[1] "Average Global Sales: 0.975432525951557"
[1] "Percentages:"
[1] "High global sales: 100 %"
[1] "High NA sales: 5.88235294117647 %"
[1] "High JP sales: 0 %"
[1] "High EU sales: 0 %"
[1] "High Other sales: 2.94117647058824 %"
[1] "Games in franchise with high sales: 58.8235294117647 %"
[1] "Games in franchise: 58.8235294117647 %"
[1] "Percentage of high selling games ratings:"
[1] "E: 38.2352941176471 %"
[1] "EC: 0 %"
[1] "E10+: 11.7647058823529 %"
[1] "T: 26.4705882352941 %"
[1] "M: 23.5294117647059 %"
[1] "Platform Frequencies of High Sale Games:"
     Platform3DS PlatformDS PlatformGC PlatformPS2 PlatformPS3 PlatformPSP
2519           1          4          1           5           9           1
     PlatformWii PlatformWiiU PlatformX360 PlatformXB
2519           6            1            5          1
[1] "Platform Frequencies"
     Platform3DS PlatformDS PlatformGC PlatformPS2 PlatformPS3 PlatformPSP
2519           1          4          1           5           9           1
     PlatformWii PlatformWiiU PlatformX360 PlatformXB
2519           6            1            5          1
[1] "------------------------------------------"
[1] "Clus= 4"
[1] "Total number of games in cluster: 70"
[1] "Average Global Sales: 0.89327731092437"
[1] "Percentages:"
[1] "High global sales: 41.4285714285714 %"
[1] "High NA sales: 4.28571428571429 %"
[1] "High JP sales: 0 %"
[1] "High EU sales: 2.85714285714286 %"
[1] "High Other sales: 5.71428571428571 %"
[1] "Games in franchise with high sales: 25.7142857142857 %"
[1] "Games in franchise: 44.2857142857143 %"
[1] "Percentage of high selling games ratings:"
[1] "E: 31.4285714285714 %"
[1] "EC: 0 %"
[1] "E10+: 21.4285714285714 %"
[1] "T: 30 %"
[1] "M: 17.1428571428571 %"
[1] "Platform Frequencies of High Sale Games:"
     PlatformDS PlatformGBA PlatformGC PlatformPS2 PlatformPS3 PlatformPSP
2632          6           1          2           1           2           1
     PlatformWii PlatformX360 PlatformXOne
2632           4           11            1
[1] "Platform Frequencies"
     Platform3DS PlatformDS PlatformGBA PlatformGC PlatformPC PlatformPS2
2776           2          9           2          2          3           6
     PlatformPS3 PlatformPS4 PlatformPSP PlatformWii PlatformWiiU PlatformX360
2776          12           1           3          13            1           13
     PlatformXB PlatformXOne
2776          2            1
[1] "------------------------------------------"
[1] "Optimal Number of Clusters found Through Silhouette Index: 2"
[1] "Summary for: GenrePuzzle"
[1] "*******************************************"
[1] "Clus= 1"
[1] "Total number of games in cluster: 25"
[1] "Average Global Sales: 0.988235294117647"
[1] "Percentages:"
[1] "High global sales: 100 %"
[1] "High NA sales: 8 %"
[1] "High JP sales: 0 %"
[1] "High EU sales: 0 %"
[1] "High Other sales: 12 %"
[1] "Games in franchise with high sales: 40 %"
[1] "Games in franchise: 40 %"
[1] "Percentage of high selling games ratings:"
[1] "E: 36 %"
[1] "EC: 0 %"
[1] "E10+: 12 %"
[1] "T: 28 %"
[1] "M: 24 %"
[1] "Platform Frequencies of High Sale Games:"
     PlatformDS PlatformGC PlatformPS2 PlatformPS3 PlatformWii PlatformWiiU
2451          2          2           2           8           5            1
     PlatformX360 PlatformXB
2451            4          1
[1] "Platform Frequencies"
     PlatformDS PlatformGC PlatformPS2 PlatformPS3 PlatformWii PlatformWiiU
2451          2          2           2           8           5            1
     PlatformX360 PlatformXB
2451            4          1
[1] "------------------------------------------"
[1] "Clus= 2"
[1] "Total number of games in cluster: 203"
[1] "Average Global Sales: 0.905128948130977"
[1] "Percentages:"
[1] "High global sales: 52.7093596059113 %"
[1] "High NA sales: 5.91133004926108 %"
[1] "High JP sales: 0 %"
[1] "High EU sales: 0.985221674876847 %"
[1] "High Other sales: 5.41871921182266 %"
[1] "Games in franchise with high sales: 32.0197044334975 %"
[1] "Games in franchise: 49.7536945812808 %"
[1] "Percentage of high selling games ratings:"
[1] "E: 33.4975369458128 %"
[1] "EC: 0 %"
[1] "E10+: 14.2857142857143 %"
[1] "T: 31.0344827586207 %"
[1] "M: 21.1822660098522 %"
[1] "Platform Frequencies of High Sale Games:"
     Platform3DS PlatformDS PlatformGBA PlatformGC PlatformPS2 PlatformPS3
2632           2         11           3          5          17          22
     PlatformPSP PlatformPSV PlatformWii PlatformX360 PlatformXB PlatformXOne
2632           2           1          14           24          5            1
[1] "Platform Frequencies"
     Platform3DS PlatformDS PlatformGBA PlatformGC PlatformPC PlatformPS2
2815           5         23          10          6          4          25
     PlatformPS3 PlatformPS4 PlatformPSP PlatformPSV PlatformWii PlatformWiiU
2815          42           1           7           1          28            3
     PlatformX360 PlatformXB PlatformXOne
2815           36         11            1
[1] "------------------------------------------"
[1] "Optimal Number of Clusters found Through Silhouette Index: 4"
[1] "Summary for: GenreRacing"
[1] "*******************************************"
[1] "Clus= 1"
[1] "Total number of games in cluster: 92"
[1] "Average Global Sales: 0.839897698209719"
[1] "Percentages:"
[1] "High global sales: 14.1304347826087 %"
[1] "High NA sales: 1.08695652173913 %"
[1] "High JP sales: 0 %"
[1] "High EU sales: 1.08695652173913 %"
[1] "High Other sales: 4.34782608695652 %"
[1] "Games in franchise with high sales: 9.78260869565217 %"
[1] "Games in franchise: 46.7391304347826 %"
[1] "Percentage of high selling games ratings:"
[1] "E: 36.9565217391304 %"
[1] "EC: 0 %"
[1] "E10+: 16.304347826087 %"
[1] "T: 25 %"
[1] "M: 21.7391304347826 %"
[1] "Platform Frequencies of High Sale Games:"
     PlatformDS PlatformGC PlatformPS2 PlatformPS3 PlatformWii PlatformX360
2630          1          2           1           4           1            3
     PlatformXB
2630          1
[1] "Platform Frequencies"
     Platform3DS PlatformDS PlatformGBA PlatformGC PlatformPC PlatformPS2
3058           1         12           8          7          5          11
     PlatformPS3 PlatformPSP PlatformWii PlatformWiiU PlatformX360 PlatformXB
3058          14           5           6            3           13          6
     PlatformXOne
3058            1
[1] "------------------------------------------"
[1] "Clus= 2"
[1] "Total number of games in cluster: 54"
[1] "Average Global Sales: 0.959477124183007"
[1] "Percentages:"
[1] "High global sales: 100 %"
[1] "High NA sales: 18.5185185185185 %"
[1] "High JP sales: 0 %"
[1] "High EU sales: 1.85185185185185 %"
[1] "High Other sales: 7.40740740740741 %"
[1] "Games in franchise with high sales: 62.962962962963 %"
[1] "Games in franchise: 62.962962962963 %"
[1] "Percentage of high selling games ratings:"
[1] "E: 44.4444444444444 %"
[1] "EC: 0 %"
[1] "E10+: 9.25925925925926 %"
[1] "T: 29.6296296296296 %"
[1] "M: 16.6666666666667 %"
[1] "Platform Frequencies of High Sale Games:"
     PlatformDS PlatformGBA PlatformGC PlatformPS2 PlatformPS3 PlatformWii
2572          6           1          3          11          14           8
     PlatformX360 PlatformXB PlatformXOne
2572            7          3            1
[1] "Platform Frequencies"
     PlatformDS PlatformGBA PlatformGC PlatformPS2 PlatformPS3 PlatformWii
2572          6           1          3          11          14           8
     PlatformX360 PlatformXB PlatformXOne
2572            7          3            1
[1] "------------------------------------------"
[1] "Clus= 3"
[1] "Total number of games in cluster: 194"
[1] "Average Global Sales: 0.836264402668284"
[1] "Percentages:"
[1] "High global sales: 13.4020618556701 %"
[1] "High NA sales: 0 %"
[1] "High JP sales: 1.03092783505155 %"
[1] "High EU sales: 1.03092783505155 %"
[1] "High Other sales: 4.63917525773196 %"
[1] "Games in franchise with high sales: 7.7319587628866 %"
[1] "Games in franchise: 46.9072164948454 %"
[1] "Percentage of high selling games ratings:"
[1] "E: 34.5360824742268 %"
[1] "EC: 0 %"
[1] "E10+: 13.9175257731959 %"
[1] "T: 32.4742268041237 %"
[1] "M: 19.0721649484536 %"
[1] "Platform Frequencies of High Sale Games:"
     PlatformDS PlatformGBA PlatformGC PlatformPS2 PlatformPS3 PlatformPSP
2632          3           1          1           2           2           1
     PlatformPSV PlatformWii PlatformX360 PlatformXB
2632           1           2           12          1
[1] "Platform Frequencies"
     Platform3DS PlatformDS PlatformGBA PlatformGC PlatformPC PlatformPS2
3064           4         20           8          7          8          21
     PlatformPS3 PlatformPS4 PlatformPSP PlatformPSV PlatformWii PlatformWiiU
3064          33           4           9           1          21            2
     PlatformX360 PlatformXB PlatformXOne
3064           37         16            3
[1] "------------------------------------------"
[1] "Clus= 4"
[1] "Total number of games in cluster: 39"
[1] "Average Global Sales: 0.968627450980392"
[1] "Percentages:"
[1] "High global sales: 100 %"
[1] "High NA sales: 7.69230769230769 %"
[1] "High JP sales: 0 %"
[1] "High EU sales: 0 %"
[1] "High Other sales: 7.69230769230769 %"
[1] "Games in franchise with high sales: 43.5897435897436 %"
[1] "Games in franchise: 43.5897435897436 %"
[1] "Percentage of high selling games ratings:"
[1] "E: 28.2051282051282 %"
[1] "EC: 0 %"
[1] "E10+: 10.2564102564103 %"
[1] "T: 35.8974358974359 %"
[1] "M: 25.6410256410256 %"
[1] "Platform Frequencies of High Sale Games:"
     Platform3DS PlatformDS PlatformGBA PlatformGC PlatformPS2 PlatformPS3
2555           2          3           1          1           5          10
     PlatformPSP PlatformWii PlatformWiiU PlatformX360 PlatformXB
2555           1           8            1            6          1
[1] "Platform Frequencies"
     Platform3DS PlatformDS PlatformGBA PlatformGC PlatformPS2 PlatformPS3
2555           2          3           1          1           5          10
     PlatformPSP PlatformWii PlatformWiiU PlatformX360 PlatformXB
2555           1           8            1            6          1
[1] "------------------------------------------"
[1] "Optimal Number of Clusters found Through Silhouette Index: 2"
[1] "Summary for: GenreRole.Playing"
[1] "*******************************************"
[1] "Clus= 1"
[1] "Total number of games in cluster: 270"
[1] "Average Global Sales: 0.839956427015251"
[1] "Percentages:"
[1] "High global sales: 13.3333333333333 %"
[1] "High NA sales: 0.37037037037037 %"
[1] "High JP sales: 0.740740740740741 %"
[1] "High EU sales: 1.11111111111111 %"
[1] "High Other sales: 4.81481481481481 %"
[1] "Games in franchise with high sales: 7.77777777777778 %"
[1] "Games in franchise: 46.2962962962963 %"
[1] "Percentage of high selling games ratings:"
[1] "E: 35.9259259259259 %"
[1] "EC: 0 %"
[1] "E10+: 14.8148148148148 %"
[1] "T: 29.2592592592593 %"
[1] "M: 20 %"
[1] "Platform Frequencies of High Sale Games:"
     PlatformDS PlatformGBA PlatformGC PlatformPS2 PlatformPS3 PlatformPSP
2632          4           1          2           5           6           1
     PlatformPSV PlatformWii PlatformX360 PlatformXB
2632           1           2           13          1
[1] "Platform Frequencies"
     Platform3DS PlatformDS PlatformGBA PlatformGC PlatformPC PlatformPS2
3044           5         32          14         12         11          32
     PlatformPS3 PlatformPS4 PlatformPSP PlatformPSV PlatformWii PlatformWiiU
3044          45           4          13           1          25            4
     PlatformX360 PlatformXB PlatformXOne
3044           47         21            4
[1] "------------------------------------------"
[1] "Clus= 2"
[1] "Total number of games in cluster: 96"
[1] "Average Global Sales: 0.962132352941176"
[1] "Percentages:"
[1] "High global sales: 100 %"
[1] "High NA sales: 13.5416666666667 %"
[1] "High JP sales: 0 %"
[1] "High EU sales: 1.04166666666667 %"
[1] "High Other sales: 7.29166666666667 %"
[1] "Games in franchise with high sales: 56.25 %"
[1] "Games in franchise: 56.25 %"
[1] "Percentage of high selling games ratings:"
[1] "E: 37.5 %"
[1] "EC: 0 %"
[1] "E10+: 9.375 %"
[1] "T: 32.2916666666667 %"
[1] "M: 20.8333333333333 %"
[1] "Platform Frequencies of High Sale Games:"
     Platform3DS PlatformDS PlatformGBA PlatformGC PlatformPS2 PlatformPS3
2583           2          9           2          5          14          24
     PlatformPSP PlatformWii PlatformWiiU PlatformX360 PlatformXB PlatformXOne
2583           1          17            1           15          5            1
[1] "Platform Frequencies"
     Platform3DS PlatformDS PlatformGBA PlatformGC PlatformPS2 PlatformPS3
2583           2          9           2          5          14          24
     PlatformPSP PlatformWii PlatformWiiU PlatformX360 PlatformXB PlatformXOne
2583           1          17            1           15          5            1
[1] "------------------------------------------"
[1] "Optimal Number of Clusters found Through Silhouette Index: 2"
[1] "Summary for: GenreShooter"
[1] "*******************************************"
[1] "Clus= 1"
[1] "Total number of games in cluster: 323"
[1] "Average Global Sales: 0.798579493716991"
[1] "Percentages:"
[1] "High global sales: 0.309597523219814 %"
[1] "High NA sales: 0 %"
[1] "High JP sales: 1.23839009287926 %"
[1] "High EU sales: 0.928792569659443 %"
[1] "High Other sales: 4.3343653250774 %"
[1] "Games in franchise with high sales: 0.309597523219814 %"
[1] "Games in franchise: 45.8204334365325 %"
[1] "Percentage of high selling games ratings:"
[1] "E: 36.5325077399381 %"
[1] "EC: 0 %"
[1] "E10+: 12.3839009287926 %"
[1] "T: 33.7461300309598 %"
[1] "M: 17.3374613003096 %"
[1] "Platform Frequencies of High Sale Games:"
[1] 1
[1] "Platform Frequencies"
     Platform3DS PlatformDS PlatformGBA PlatformGC PlatformPC PlatformPS2
3218           6         33          19         14         19          43
     PlatformPS3 PlatformPS4 PlatformPSP PlatformPSV PlatformWii PlatformWiiU
3218          54           4          19           2          30            6
     PlatformX360 PlatformXB PlatformXOne
3218           43         26            5
[1] "------------------------------------------"
[1] "Clus= 2"
[1] "Total number of games in cluster: 147"
[1] "Average Global Sales: 0.942376950780312"
[1] "Percentages:"
[1] "High global sales: 89.1156462585034 %"
[1] "High NA sales: 9.52380952380952 %"
[1] "High JP sales: 0 %"
[1] "High EU sales: 1.36054421768707 %"
[1] "High Other sales: 6.12244897959184 %"
[1] "Games in franchise with high sales: 50.3401360544218 %"
[1] "Games in franchise: 53.0612244897959 %"
[1] "Percentage of high selling games ratings:"
[1] "E: 33.3333333333333 %"
[1] "EC: 0 %"
[1] "E10+: 14.2857142857143 %"
[1] "T: 27.891156462585 %"
[1] "M: 24.4897959183673 %"
[1] "Platform Frequencies of High Sale Games:"
     Platform3DS PlatformDS PlatformGBA PlatformGC PlatformPS2 PlatformPS3
2632           2         12           3          7          19          30
     PlatformPSP PlatformPSV PlatformWii PlatformWiiU PlatformX360 PlatformXB
2632           2           1          19            1           28          6
     PlatformXOne
2632            1
[1] "Platform Frequencies"
     Platform3DS PlatformDS PlatformGBA PlatformGC PlatformPS2 PlatformPS3
2707           3         13           4          7          22          31
     PlatformPSP PlatformPSV PlatformWii PlatformWiiU PlatformX360 PlatformXB
2707           2           1          22            1           33          7
     PlatformXOne
2707            1
[1] "------------------------------------------"
[1] "Optimal Number of Clusters found Through Silhouette Index: 4"
[1] "Summary for: GenreSimulation"
[1] "*******************************************"
[1] "Clus= 1"
[1] "Total number of games in cluster: 173"
[1] "Average Global Sales: 0.839714382862972"
[1] "Percentages:"
[1] "High global sales: 15.606936416185 %"
[1] "High NA sales: 0.578034682080925 %"
[1] "High JP sales: 1.15606936416185 %"
[1] "High EU sales: 0.578034682080925 %"
[1] "High Other sales: 5.78034682080925 %"
[1] "Games in franchise with high sales: 8.67052023121387 %"
[1] "Games in franchise: 46.8208092485549 %"
[1] "Percentage of high selling games ratings:"
[1] "E: 36.9942196531792 %"
[1] "EC: 0 %"
[1] "E10+: 14.4508670520231 %"
[1] "T: 31.7919075144509 %"
[1] "M: 16.7630057803468 %"
[1] "Platform Frequencies of High Sale Games:"
     PlatformDS PlatformGBA PlatformGC PlatformPS2 PlatformPS3 PlatformPSP
2630          4           1          2           3           4           1
     PlatformWii PlatformX360
2630           2           10
[1] "Platform Frequencies"
     Platform3DS PlatformDS PlatformGBA PlatformGC PlatformPC PlatformPS2
3067           3         20           9         10         10          16
     PlatformPS3 PlatformPS4 PlatformPSP PlatformWii PlatformWiiU PlatformX360
3067          30           2          10          15            2           33
     PlatformXB PlatformXOne
3067         10            3
[1] "------------------------------------------"
[1] "Clus= 2"
[1] "Total number of games in cluster: 61"
[1] "Average Global Sales: 0.962005785920926"
[1] "Percentages:"
[1] "High global sales: 100 %"
[1] "High NA sales: 19.672131147541 %"
[1] "High JP sales: 0 %"
[1] "High EU sales: 0 %"
[1] "High Other sales: 6.55737704918033 %"
[1] "Games in franchise with high sales: 55.7377049180328 %"
[1] "Games in franchise: 55.7377049180328 %"
[1] "Percentage of high selling games ratings:"
[1] "E: 39.344262295082 %"
[1] "EC: 0 %"
[1] "E10+: 6.55737704918033 %"
[1] "T: 36.0655737704918 %"
[1] "M: 18.0327868852459 %"
[1] "Platform Frequencies of High Sale Games:"
     Platform3DS PlatformDS PlatformGBA PlatformGC PlatformPS2 PlatformPS3
2569           2          5           1          2          11          19
     PlatformPSP PlatformWii PlatformX360 PlatformXB PlatformXOne
2569           1           8            8          3            1
[1] "Platform Frequencies"
     Platform3DS PlatformDS PlatformGBA PlatformGC PlatformPS2 PlatformPS3
2569           2          5           1          2          11          19
     PlatformPSP PlatformWii PlatformX360 PlatformXB PlatformXOne
2569           1           8            8          3            1
[1] "------------------------------------------"
[1] "Clus= 3"
[1] "Total number of games in cluster: 116"
[1] "Average Global Sales: 0.835294117647059"
[1] "Percentages:"
[1] "High global sales: 12.0689655172414 %"
[1] "High NA sales: 0.862068965517241 %"
[1] "High JP sales: 0 %"
[1] "High EU sales: 1.72413793103448 %"
[1] "High Other sales: 2.58620689655172 %"
[1] "Games in franchise with high sales: 7.75862068965517 %"
[1] "Games in franchise: 45.6896551724138 %"
[1] "Percentage of high selling games ratings:"
[1] "E: 32.7586206896552 %"
[1] "EC: 0 %"
[1] "E10+: 15.5172413793103 %"
[1] "T: 27.5862068965517 %"
[1] "M: 24.1379310344828 %"
[1] "Platform Frequencies of High Sale Games:"
     PlatformDS PlatformPS2 PlatformPS3 PlatformPSV PlatformWii PlatformX360
2632          2           1           2           1           1            6
     PlatformXB
2632          1
[1] "Platform Frequencies"
     Platform3DS PlatformDS PlatformGBA PlatformGC PlatformPC PlatformPS2
3062           2         14           7          3          3          17
     PlatformPS3 PlatformPS4 PlatformPSP PlatformPSV PlatformWii PlatformWiiU
3062          18           2           4           1          12            3
     PlatformX360 PlatformXB PlatformXOne
3062           18         11            1
[1] "------------------------------------------"
[1] "Clus= 4"
[1] "Total number of games in cluster: 30"
[1] "Average Global Sales: 0.967058823529412"
[1] "Percentages:"
[1] "High global sales: 100 %"
[1] "High NA sales: 0 %"
[1] "High JP sales: 0 %"
[1] "High EU sales: 3.33333333333333 %"
[1] "High Other sales: 10 %"
[1] "Games in franchise with high sales: 56.6666666666667 %"
[1] "Games in franchise: 56.6666666666667 %"
[1] "Percentage of high selling games ratings:"
[1] "E: 33.3333333333333 %"
[1] "EC: 0 %"
[1] "E10+: 16.6666666666667 %"
[1] "T: 23.3333333333333 %"
[1] "M: 26.6666666666667 %"
[1] "Platform Frequencies of High Sale Games:"
     PlatformDS PlatformGBA PlatformGC PlatformPS2 PlatformPS3 PlatformWii
2555          2           1          3           4           5           8
     PlatformWiiU PlatformX360 PlatformXB
2555            1            4          2
[1] "Platform Frequencies"
     PlatformDS PlatformGBA PlatformGC PlatformPS2 PlatformPS3 PlatformWii
2555          2           1          3           4           5           8
     PlatformWiiU PlatformX360 PlatformXB
2555            1            4          2
[1] "------------------------------------------"
[1] "Optimal Number of Clusters found Through Silhouette Index: 3"
[1] "Summary for: GenreSports"
[1] "*******************************************"
[1] "Clus= 1"
[1] "Total number of games in cluster: 148"
[1] "Average Global Sales: 0.755484896661367"
[1] "Percentages:"
[1] "High global sales: 3.37837837837838 %"
[1] "High NA sales: 0 %"
[1] "High JP sales: 0 %"
[1] "High EU sales: 0.675675675675676 %"
[1] "High Other sales: 1.35135135135135 %"
[1] "Games in franchise with high sales: 2.02702702702703 %"
[1] "Games in franchise: 46.6216216216216 %"
[1] "Percentage of high selling games ratings:"
[1] "E: 36.4864864864865 %"
[1] "EC: 0 %"
[1] "E10+: 14.1891891891892 %"
[1] "T: 30.4054054054054 %"
[1] "M: 18.9189189189189 %"
[1] "Platform Frequencies of High Sale Games:"
     PlatformDS PlatformPS2 PlatformPS3 PlatformX360
2591          1           1           1            2
[1] "Platform Frequencies"
     Platform3DS PlatformDS PlatformGBA PlatformGC PlatformPC PlatformPS2
3590           3         14          11          3          4          22
     PlatformPS3 PlatformPS4 PlatformPSP PlatformPSV PlatformWii PlatformWiiU
3590          21           3           5           2          17            2
     PlatformX360 PlatformXB PlatformXOne
3590           26         13            2
[1] "------------------------------------------"
[1] "Clus= 2"
[1] "Total number of games in cluster: 344"
[1] "Average Global Sales: 0.728180574555404"
[1] "Percentages:"
[1] "High global sales: 0 %"
[1] "High NA sales: 0 %"
[1] "High JP sales: 1.45348837209302 %"
[1] "High EU sales: 0.581395348837209 %"
[1] "High Other sales: 3.48837209302326 %"
[1] "Games in franchise with high sales: 0 %"
[1] "Games in franchise: 47.9651162790698 %"
[1] "Percentage of high selling games ratings:"
[1] "E: 38.6627906976744 %"
[1] "EC: 0 %"
[1] "E10+: 16.8604651162791 %"
[1] "T: 29.3604651162791 %"
[1] "M: 15.1162790697674 %"
[1] "Platform Frequencies of High Sale Games:"
data frame with 0 columns and 0 rows
[1] "Platform Frequencies"
     Platform3DS PlatformDS PlatformGBA PlatformGC PlatformPC PlatformPS2
3588           8         32          20         17         15          58
     PlatformPS3 PlatformPS4 PlatformPSP PlatformPSV PlatformWii PlatformWiiU
3588          56           3          17           3          34            6
     PlatformX360 PlatformXB PlatformXOne
3588           45         25            5
[1] "------------------------------------------"
[1] "Clus= 3"
[1] "Total number of games in cluster: 205"
[1] "Average Global Sales: 0.91845050215208"
[1] "Percentages:"
[1] "High global sales: 61.9512195121951 %"
[1] "High NA sales: 6.82926829268293 %"
[1] "High JP sales: 0 %"
[1] "High EU sales: 0.975609756097561 %"
[1] "High Other sales: 6.82926829268293 %"
[1] "Games in franchise with high sales: 35.1219512195122 %"
[1] "Games in franchise: 51.219512195122 %"
[1] "Percentage of high selling games ratings:"
[1] "E: 33.6585365853659 %"
[1] "EC: 0 %"
[1] "E10+: 12.6829268292683 %"
[1] "T: 31.7073170731707 %"
[1] "M: 21.9512195121951 %"
[1] "Platform Frequencies of High Sale Games:"
     Platform3DS PlatformDS PlatformGBA PlatformGC PlatformPS2 PlatformPS3
2632           2         12           3          7          18          29
     PlatformPSP PlatformPSV PlatformWii PlatformWiiU PlatformX360 PlatformXB
2632           2           1          19            1           26          6
     PlatformXOne
2632            1
[1] "Platform Frequencies"
     Platform3DS PlatformDS PlatformGBA PlatformGC PlatformPC PlatformPS2
2951           4         20           8          8          5          26
     PlatformPS3 PlatformPS4 PlatformPSP PlatformPSV PlatformWii PlatformWiiU
2951          45           1           7           1          29            2
     PlatformX360 PlatformXB PlatformXOne
2951           37         11            1
[1] "------------------------------------------"
[1] "Optimal Number of Clusters found Through Silhouette Index: 3"
[1] "Summary for: GenreStrategy"
[1] "*******************************************"
[1] "Clus= 1"
[1] "Total number of games in cluster: 37"
[1] "Average Global Sales: 0.923370429252782"
[1] "Percentages:"
[1] "High global sales: 72.972972972973 %"
[1] "High NA sales: 8.10810810810811 %"
[1] "High JP sales: 0 %"
[1] "High EU sales: 0 %"
[1] "High Other sales: 0 %"
[1] "Games in franchise with high sales: 48.6486486486487 %"
[1] "Games in franchise: 59.4594594594595 %"
[1] "Percentage of high selling games ratings:"
[1] "E: 43.2432432432432 %"
[1] "EC: 0 %"
[1] "E10+: 10.8108108108108 %"
[1] "T: 27.027027027027 %"
[1] "M: 18.9189189189189 %"
[1] "Platform Frequencies of High Sale Games:"
     PlatformDS PlatformGBA PlatformGC PlatformPS2 PlatformPS3 PlatformWii
2628          3           3          4           1           5           4
     PlatformX360 PlatformXB PlatformXOne
2628            5          1            1
[1] "Platform Frequencies"
     PlatformDS PlatformGBA PlatformGC PlatformPC PlatformPS2 PlatformPS3
2776          5           5          4          1           2           7
     PlatformPSP PlatformWii PlatformX360 PlatformXB PlatformXOne
2776           1           4            6          1            1
[1] "------------------------------------------"
[1] "Clus= 2"
[1] "Total number of games in cluster: 147"
[1] "Average Global Sales: 0.899799919967987"
[1] "Percentages:"
[1] "High global sales: 47.6190476190476 %"
[1] "High NA sales: 5.4421768707483 %"
[1] "High JP sales: 0 %"
[1] "High EU sales: 1.36054421768707 %"
[1] "High Other sales: 7.48299319727891 %"
[1] "Games in franchise with high sales: 29.2517006802721 %"
[1] "Games in franchise: 46.9387755102041 %"
[1] "Percentage of high selling games ratings:"
[1] "E: 29.2517006802721 %"
[1] "EC: 0 %"
[1] "E10+: 14.9659863945578 %"
[1] "T: 32.6530612244898 %"
[1] "M: 23.1292517006803 %"
[1] "Platform Frequencies of High Sale Games:"
     Platform3DS PlatformDS PlatformGC PlatformPS2 PlatformPS3 PlatformPSP
2632           2          6          1          13          14           1
     PlatformPSV PlatformWii PlatformX360 PlatformXB
2632           1          10           19          3
[1] "Platform Frequencies"
     Platform3DS PlatformDS PlatformGBA PlatformGC PlatformPC PlatformPS2
2804           5         14           3          1          3          19
     PlatformPS3 PlatformPS4 PlatformPSP PlatformPSV PlatformWii PlatformWiiU
2804          31           1           5           1          23            2
     PlatformX360 PlatformXB
2804           30          9
[1] "------------------------------------------"
[1] "Clus= 3"
[1] "Total number of games in cluster: 35"
[1] "Average Global Sales: 0.98453781512605"
[1] "Percentages:"
[1] "High global sales: 100 %"
[1] "High NA sales: 8.57142857142857 %"
[1] "High JP sales: 0 %"
[1] "High EU sales: 0 %"
[1] "High Other sales: 8.57142857142857 %"
[1] "Games in franchise with high sales: 40 %"
[1] "Games in franchise: 40 %"
[1] "Percentage of high selling games ratings:"
[1] "E: 40 %"
[1] "EC: 0 %"
[1] "E10+: 11.4285714285714 %"
[1] "T: 25.7142857142857 %"
[1] "M: 22.8571428571429 %"
[1] "Platform Frequencies of High Sale Games:"
     PlatformDS PlatformGC PlatformPS2 PlatformPS3 PlatformPSP PlatformWii
2479          4          2           5          11           1           5
     PlatformWiiU PlatformX360 PlatformXB
2479            1            4          2
[1] "Platform Frequencies"
     PlatformDS PlatformGC PlatformPS2 PlatformPS3 PlatformPSP PlatformWii
2479          4          2           5          11           1           5
     PlatformWiiU PlatformX360 PlatformXB
2479            1            4          2
[1] "------------------------------------------"

Hierarchical¶

In [ ]:
genreDendrogram(clustering_dataset,genres)
[1] "Optimal Number of Clusters found Through Silhouette Index: 3"
Warning message:
“The `<scale>` argument of `guides()` cannot be `FALSE`. Use "none" instead as
of ggplot2 3.3.4.
ℹ The deprecated feature was likely used in the factoextra package.
  Please report the issue at <https://github.com/kassambara/factoextra/issues>.”
[1] "Optimal Number of Clusters found Through Silhouette Index: 2"
[1] "Optimal Number of Clusters found Through Silhouette Index: 2"
[1] "Optimal Number of Clusters found Through Silhouette Index: 4"
[1] "Optimal Number of Clusters found Through Silhouette Index: 4"
[1] "Optimal Number of Clusters found Through Silhouette Index: 2"
[1] "Optimal Number of Clusters found Through Silhouette Index: 4"
[1] "Optimal Number of Clusters found Through Silhouette Index: 2"
[1] "Optimal Number of Clusters found Through Silhouette Index: 2"
[1] "Optimal Number of Clusters found Through Silhouette Index: 4"
[1] "Optimal Number of Clusters found Through Silhouette Index: 3"
[1] "Optimal Number of Clusters found Through Silhouette Index: 3"
In [ ]:
#Cluster numbers for hierarchical clustering based off of dendrograms
clusterNums <- c(4, 3, 2, 5, 5, 3, 5, 5, 2, 4, 4, 4)
In [ ]:
genreHierarchicalClustering(clustering_dataset, genres, clusterNums, gamesForClustering)
[1] "Summary for: GenreAction"
[1] "*******************************************"
[1] "Clus= 1"
[1] "Total number of games in cluster: 212"
[1] "Average Global Sales: 0.886126526082131"
[1] "Percentages:"
[1] "High global sales: 41.0377358490566 %"
[1] "High NA sales: 3.77358490566038 %"
[1] "High JP sales: 0.943396226415094 %"
[1] "High EU sales: 1.41509433962264 %"
[1] "High Other sales: 5.66037735849057 %"
[1] "Games in franchise with high sales: 22.1698113207547 %"
[1] "Games in franchise: 45.7547169811321 %"
[1] "Percentage of high selling games ratings:"
[1] "E: 35.8490566037736 %"
[1] "EC: 0 %"
[1] "E10+: 9.90566037735849 %"
[1] "T: 32.0754716981132 %"
[1] "M: 22.1698113207547 %"
[1] "Platform Frequencies of High Sale Games:"
     Platform3DS PlatformDS PlatformGBA PlatformGC PlatformPS2 PlatformPS3
2632           1         11           2          5          14          20
     PlatformPSP PlatformWii PlatformWiiU PlatformX360 PlatformXB PlatformXOne
2632           1           9            1           20          2            1
[1] "Platform Frequencies"
     Platform3DS PlatformDS PlatformGBA PlatformGC PlatformPC PlatformPS2
3197           4         26          11          9          8          25
     PlatformPS3 PlatformPS4 PlatformPSP PlatformWii PlatformWiiU PlatformX360
3197          41           3           8          20            3           42
     PlatformXB PlatformXOne
3197         10            2
[1] "------------------------------------------"
[1] "Clus= 2"
[1] "Total number of games in cluster: 71"
[1] "Average Global Sales: 0.901242750621375"
[1] "Percentages:"
[1] "High global sales: 52.112676056338 %"
[1] "High NA sales: 7.04225352112676 %"
[1] "High JP sales: 0 %"
[1] "High EU sales: 0 %"
[1] "High Other sales: 4.22535211267606 %"
[1] "Games in franchise with high sales: 33.8028169014084 %"
[1] "Games in franchise: 56.3380281690141 %"
[1] "Percentage of high selling games ratings:"
[1] "E: 42.2535211267606 %"
[1] "EC: 0 %"
[1] "E10+: 19.7183098591549 %"
[1] "T: 22.5352112676056 %"
[1] "M: 15.4929577464789 %"
[1] "Platform Frequencies of High Sale Games:"
     PlatformDS PlatformGBA PlatformGC PlatformPS2 PlatformPS3 PlatformPSP
2625          1           1          2           5           9           1
     PlatformPSV PlatformWii PlatformX360 PlatformXB
2625           1           8            6          3
[1] "Platform Frequencies"
     Platform3DS PlatformDS PlatformGBA PlatformGC PlatformPC PlatformPS2
3123           2          6           3          3          1          10
     PlatformPS3 PlatformPSP PlatformPSV PlatformWii PlatformWiiU PlatformX360
3123          13           3           1          12            2           10
     PlatformXB
3123          5
[1] "------------------------------------------"
[1] "Clus= 3"
[1] "Total number of games in cluster: 20"
[1] "Average Global Sales: 0.858235294117647"
[1] "Percentages:"
[1] "High global sales: 40 %"
[1] "High NA sales: 5 %"
[1] "High JP sales: 0 %"
[1] "High EU sales: 0 %"
[1] "High Other sales: 5 %"
[1] "Games in franchise with high sales: 20 %"
[1] "Games in franchise: 60 %"
[1] "Percentage of high selling games ratings:"
[1] "E: 35 %"
[1] "EC: 0 %"
[1] "E10+: 20 %"
[1] "T: 25 %"
[1] "M: 20 %"
[1] "Platform Frequencies of High Sale Games:"
     Platform3DS PlatformDS PlatformPS3 PlatformWii PlatformX360 PlatformXB
2624           1          1           1           2            2          1
[1] "Platform Frequencies"
     Platform3DS PlatformDS PlatformPS3 PlatformPS4 PlatformPSP PlatformWii
3227           1          4           3           1           1           4
     PlatformX360 PlatformXB PlatformXOne
3227            3          2            1
[1] "------------------------------------------"
[1] "Clus= 4"
[1] "Total number of games in cluster: 750"
[1] "Average Global Sales: 0.655027450980392"
[1] "Percentages:"
[1] "High global sales: 0 %"
[1] "High NA sales: 0 %"
[1] "High JP sales: 0.4 %"
[1] "High EU sales: 0.266666666666667 %"
[1] "High Other sales: 1.86666666666667 %"
[1] "Games in franchise with high sales: 0 %"
[1] "Games in franchise: 46.8 %"
[1] "Percentage of high selling games ratings:"
[1] "E: 39.3333333333333 %"
[1] "EC: 0 %"
[1] "E10+: 15.6 %"
[1] "T: 28.8 %"
[1] "M: 16.2666666666667 %"
[1] "Platform Frequencies of High Sale Games:"
data frame with 0 columns and 0 rows
[1] "Platform Frequencies"
     Platform3DS PlatformDS PlatformGBA PlatformGC PlatformPC PlatformPS2
4177          18         77          40         24         25         138
     PlatformPS3 PlatformPS4 PlatformPSP PlatformPSV PlatformWii PlatformWiiU
4177         108           4          34          10          93            6
     PlatformX360 PlatformXB PlatformXOne
4177          106         59            8
[1] "------------------------------------------"
[1] "Summary for: GenreAdventure"
[1] "*******************************************"
[1] "Clus= 1"
[1] "Total number of games in cluster: 9"
[1] "Average Global Sales: 0.992156862745098"
[1] "Percentages:"
[1] "High global sales: 100 %"
[1] "High NA sales: 22.2222222222222 %"
[1] "High JP sales: 0 %"
[1] "High EU sales: 0 %"
[1] "High Other sales: 0 %"
[1] "Games in franchise with high sales: 55.5555555555556 %"
[1] "Games in franchise: 55.5555555555556 %"
[1] "Percentage of high selling games ratings:"
[1] "E: 44.4444444444444 %"
[1] "EC: 0 %"
[1] "E10+: 11.1111111111111 %"
[1] "T: 33.3333333333333 %"
[1] "M: 11.1111111111111 %"
[1] "Platform Frequencies of High Sale Games:"
     PlatformDS PlatformPS2 PlatformPS3 PlatformWii PlatformX360
2443          1           2           3           1            2
[1] "Platform Frequencies"
     PlatformDS PlatformPS2 PlatformPS3 PlatformWii PlatformX360
2443          1           2           3           1            2
[1] "------------------------------------------"
[1] "Clus= 2"
[1] "Total number of games in cluster: 110"
[1] "Average Global Sales: 0.905026737967914"
[1] "Percentages:"
[1] "High global sales: 52.7272727272727 %"
[1] "High NA sales: 7.27272727272727 %"
[1] "High JP sales: 0 %"
[1] "High EU sales: 0 %"
[1] "High Other sales: 5.45454545454545 %"
[1] "Games in franchise with high sales: 29.0909090909091 %"
[1] "Games in franchise: 51.8181818181818 %"
[1] "Percentage of high selling games ratings:"
[1] "E: 40.9090909090909 %"
[1] "EC: 0 %"
[1] "E10+: 10.9090909090909 %"
[1] "T: 27.2727272727273 %"
[1] "M: 20.9090909090909 %"
[1] "Platform Frequencies of High Sale Games:"
     Platform3DS PlatformDS PlatformGC PlatformPS2 PlatformPS3 PlatformPSP
2632           1          7          4           9          11           2
     PlatformWii PlatformWiiU PlatformX360 PlatformXB
2632           8            1           10          5
[1] "Platform Frequencies"
     Platform3DS PlatformDS PlatformGBA PlatformGC PlatformPC PlatformPS2
2904           4         13           3          5          1          15
     PlatformPS3 PlatformPSP PlatformWii PlatformWiiU PlatformX360 PlatformXB
2904          18           6          15            2           19          9
[1] "------------------------------------------"
[1] "Clus= 3"
[1] "Total number of games in cluster: 164"
[1] "Average Global Sales: 0.886441893830703"
[1] "Percentages:"
[1] "High global sales: 39.6341463414634 %"
[1] "High NA sales: 2.4390243902439 %"
[1] "High JP sales: 0.609756097560976 %"
[1] "High EU sales: 1.21951219512195 %"
[1] "High Other sales: 6.09756097560976 %"
[1] "Games in franchise with high sales: 23.1707317073171 %"
[1] "Games in franchise: 47.5609756097561 %"
[1] "Percentage of high selling games ratings:"
[1] "E: 34.7560975609756 %"
[1] "EC: 0 %"
[1] "E10+: 12.8048780487805 %"
[1] "T: 31.0975609756098 %"
[1] "M: 21.3414634146341 %"
[1] "Platform Frequencies of High Sale Games:"
     Platform3DS PlatformDS PlatformGBA PlatformGC PlatformPS2 PlatformPS3
2630           1          5           3          3           8          16
     PlatformPSV PlatformWii PlatformX360 PlatformXB PlatformXOne
2630           1          10           16          1            1
[1] "Platform Frequencies"
     Platform3DS PlatformDS PlatformGBA PlatformGC PlatformPC PlatformPS2
2906           2         18           9          7          6          17
     PlatformPS3 PlatformPS4 PlatformPSP PlatformPSV PlatformWii PlatformWiiU
2906          35           2           4           1          20            3
     PlatformX360 PlatformXB PlatformXOne
2906           31          8            1
[1] "------------------------------------------"
[1] "Summary for: GenreFighting"
[1] "*******************************************"
[1] "Clus= 1"
[1] "Total number of games in cluster: 27"
[1] "Average Global Sales: 0.987363834422658"
[1] "Percentages:"
[1] "High global sales: 100 %"
[1] "High NA sales: 7.40740740740741 %"
[1] "High JP sales: 0 %"
[1] "High EU sales: 0 %"
[1] "High Other sales: 11.1111111111111 %"
[1] "Games in franchise with high sales: 40.7407407407407 %"
[1] "Games in franchise: 40.7407407407407 %"
[1] "Percentage of high selling games ratings:"
[1] "E: 40.7407407407407 %"
[1] "EC: 0 %"
[1] "E10+: 11.1111111111111 %"
[1] "T: 25.9259259259259 %"
[1] "M: 22.2222222222222 %"
[1] "Platform Frequencies of High Sale Games:"
     PlatformDS PlatformGC PlatformPS2 PlatformPS3 PlatformWii PlatformWiiU
2459          3          1           4           8           5            1
     PlatformX360 PlatformXB
2459            4          1
[1] "Platform Frequencies"
     PlatformDS PlatformGC PlatformPS2 PlatformPS3 PlatformWii PlatformWiiU
2459          3          1           4           8           5            1
     PlatformX360 PlatformXB
2459            4          1
[1] "------------------------------------------"
[1] "Clus= 2"
[1] "Total number of games in cluster: 162"
[1] "Average Global Sales: 0.91757443718228"
[1] "Percentages:"
[1] "High global sales: 64.8148148148148 %"
[1] "High NA sales: 7.40740740740741 %"
[1] "High JP sales: 0 %"
[1] "High EU sales: 1.23456790123457 %"
[1] "High Other sales: 4.93827160493827 %"
[1] "Games in franchise with high sales: 39.5061728395062 %"
[1] "Games in franchise: 50.6172839506173 %"
[1] "Percentage of high selling games ratings:"
[1] "E: 32.7160493827161 %"
[1] "EC: 0 %"
[1] "E10+: 14.1975308641975 %"
[1] "T: 31.4814814814815 %"
[1] "M: 21.6049382716049 %"
[1] "Platform Frequencies of High Sale Games:"
     Platform3DS PlatformDS PlatformGBA PlatformGC PlatformPS2 PlatformPS3
2632           2         10           3          6          15          22
     PlatformPSP PlatformPSV PlatformWii PlatformX360 PlatformXB PlatformXOne
2632           2           1          14           24          5            1
[1] "Platform Frequencies"
     Platform3DS PlatformDS PlatformGBA PlatformGC PlatformPC PlatformPS2
2750           5         19           6          6          1          21
     PlatformPS3 PlatformPS4 PlatformPSP PlatformPSV PlatformWii PlatformWiiU
2750          30           1           6           1          24            1
     PlatformX360 PlatformXB PlatformXOne
2750           32          8            1
[1] "------------------------------------------"
[1] "Summary for: GenreMisc"
[1] "*******************************************"
[1] "Clus= 1"
[1] "Total number of games in cluster: 37"
[1] "Average Global Sales: 0.977424483306836"
[1] "Percentages:"
[1] "High global sales: 100 %"
[1] "High NA sales: 8.10810810810811 %"
[1] "High JP sales: 0 %"
[1] "High EU sales: 0 %"
[1] "High Other sales: 2.7027027027027 %"
[1] "Games in franchise with high sales: 43.2432432432432 %"
[1] "Games in franchise: 43.2432432432432 %"
[1] "Percentage of high selling games ratings:"
[1] "E: 35.1351351351351 %"
[1] "EC: 0 %"
[1] "E10+: 10.8108108108108 %"
[1] "T: 27.027027027027 %"
[1] "M: 27.027027027027 %"
[1] "Platform Frequencies of High Sale Games:"
     PlatformDS PlatformGBA PlatformGC PlatformPS2 PlatformPS3 PlatformWii
2521          4           1          2           6          10           6
     PlatformWiiU PlatformX360 PlatformXB
2521            1            5          2
[1] "Platform Frequencies"
     PlatformDS PlatformGBA PlatformGC PlatformPS2 PlatformPS3 PlatformWii
2521          4           1          2           6          10           6
     PlatformWiiU PlatformX360 PlatformXB
2521            1            5          2
[1] "------------------------------------------"
[1] "Clus= 2"
[1] "Total number of games in cluster: 8"
[1] "Average Global Sales: 0.977941176470588"
[1] "Percentages:"
[1] "High global sales: 100 %"
[1] "High NA sales: 25 %"
[1] "High JP sales: 0 %"
[1] "High EU sales: 0 %"
[1] "High Other sales: 25 %"
[1] "Games in franchise with high sales: 37.5 %"
[1] "Games in franchise: 37.5 %"
[1] "Percentage of high selling games ratings:"
[1] "E: 37.5 %"
[1] "EC: 0 %"
[1] "E10+: 0 %"
[1] "T: 25 %"
[1] "M: 37.5 %"
[1] "Platform Frequencies of High Sale Games:"
     PlatformPS2 PlatformPS3 PlatformWii PlatformX360
2495           1           4           1            2
[1] "Platform Frequencies"
     PlatformPS2 PlatformPS3 PlatformWii PlatformX360
2495           1           4           1            2
[1] "------------------------------------------"
[1] "Clus= 3"
[1] "Total number of games in cluster: 116"
[1] "Average Global Sales: 0.89868154158215"
[1] "Percentages:"
[1] "High global sales: 47.4137931034483 %"
[1] "High NA sales: 6.03448275862069 %"
[1] "High JP sales: 0 %"
[1] "High EU sales: 0 %"
[1] "High Other sales: 6.89655172413793 %"
[1] "Games in franchise with high sales: 31.0344827586207 %"
[1] "Games in franchise: 51.7241379310345 %"
[1] "Percentage of high selling games ratings:"
[1] "E: 34.4827586206897 %"
[1] "EC: 0 %"
[1] "E10+: 13.7931034482759 %"
[1] "T: 27.5862068965517 %"
[1] "M: 24.1379310344828 %"
[1] "Platform Frequencies of High Sale Games:"
     Platform3DS PlatformDS PlatformGBA PlatformGC PlatformPS2 PlatformPS3
2623           2          6           1          1           8          10
     PlatformPSP PlatformPSV PlatformWii PlatformX360 PlatformXB PlatformXOne
2623           2           1           8           12          3            1
[1] "Platform Frequencies"
     Platform3DS PlatformDS PlatformGBA PlatformGC PlatformPC PlatformPS2
2867           5         11           7          1          2          16
     PlatformPS3 PlatformPS4 PlatformPSP PlatformPSV PlatformWii PlatformWiiU
2867          24           1           4           1          11            3
     PlatformX360 PlatformXB PlatformXOne
2867           22          7            1
[1] "------------------------------------------"
[1] "Clus= 4"
[1] "Total number of games in cluster: 158"
[1] "Average Global Sales: 0.821221146686523"
[1] "Percentages:"
[1] "High global sales: 20.253164556962 %"
[1] "High NA sales: 1.26582278481013 %"
[1] "High JP sales: 0.632911392405063 %"
[1] "High EU sales: 1.89873417721519 %"
[1] "High Other sales: 4.43037974683544 %"
[1] "Games in franchise with high sales: 12.6582278481013 %"
[1] "Games in franchise: 50 %"
[1] "Percentage of high selling games ratings:"
[1] "E: 32.9113924050633 %"
[1] "EC: 0 %"
[1] "E10+: 17.0886075949367 %"
[1] "T: 32.2784810126582 %"
[1] "M: 17.7215189873418 %"
[1] "Platform Frequencies of High Sale Games:"
     PlatformDS PlatformGBA PlatformGC PlatformPS2 PlatformPS3 PlatformWii
2632          3           1          4           4           6           4
     PlatformX360 PlatformXB
2632            9          1
[1] "Platform Frequencies"
     Platform3DS PlatformDS PlatformGBA PlatformGC PlatformPC PlatformPS2
3333           1         17           8          8          7          16
     PlatformPS3 PlatformPSP PlatformPSV PlatformWii PlatformWiiU PlatformX360
3333          30           9           1          23            3           25
     PlatformXB PlatformXOne
3333          9            1
[1] "------------------------------------------"
[1] "Clus= 5"
[1] "Total number of games in cluster: 225"
[1] "Average Global Sales: 0.758745098039216"
[1] "Percentages:"
[1] "High global sales: 0 %"
[1] "High NA sales: 0 %"
[1] "High JP sales: 1.77777777777778 %"
[1] "High EU sales: 0.888888888888889 %"
[1] "High Other sales: 3.55555555555556 %"
[1] "Games in franchise with high sales: 0 %"
[1] "Games in franchise: 45.3333333333333 %"
[1] "Percentage of high selling games ratings:"
[1] "E: 38.6666666666667 %"
[1] "EC: 0 %"
[1] "E10+: 13.3333333333333 %"
[1] "T: 32.4444444444444 %"
[1] "M: 15.5555555555556 %"
[1] "Platform Frequencies of High Sale Games:"
data frame with 0 columns and 0 rows
[1] "Platform Frequencies"
     Platform3DS PlatformDS PlatformGBA PlatformGC PlatformPC PlatformPS2
3339           6         20          16         11         10          36
     PlatformPS3 PlatformPS4 PlatformPSP PlatformPSV PlatformWii PlatformWiiU
3339          33           4           9           2          20            1
     PlatformX360 PlatformXB PlatformXOne
3339           33         19            5
[1] "------------------------------------------"
[1] "Summary for: GenrePlatform"
[1] "*******************************************"
[1] "Clus= 1"
[1] "Total number of games in cluster: 4"
[1] "Average Global Sales: 0.994117647058824"
[1] "Percentages:"
[1] "High global sales: 100 %"
[1] "High NA sales: 0 %"
[1] "High JP sales: 0 %"
[1] "High EU sales: 0 %"
[1] "High Other sales: 0 %"
[1] "Games in franchise with high sales: 50 %"
[1] "Games in franchise: 50 %"
[1] "Percentage of high selling games ratings:"
[1] "E: 50 %"
[1] "EC: 0 %"
[1] "E10+: 0 %"
[1] "T: 25 %"
[1] "M: 25 %"
[1] "Platform Frequencies of High Sale Games:"
     PlatformDS PlatformPS3 PlatformX360
2442          2           1            1
[1] "Platform Frequencies"
     PlatformDS PlatformPS3 PlatformX360
2442          2           1            1
[1] "------------------------------------------"
[1] "Clus= 2"
[1] "Total number of games in cluster: 9"
[1] "Average Global Sales: 0.979084967320261"
[1] "Percentages:"
[1] "High global sales: 100 %"
[1] "High NA sales: 22.2222222222222 %"
[1] "High JP sales: 0 %"
[1] "High EU sales: 0 %"
[1] "High Other sales: 11.1111111111111 %"
[1] "Games in franchise with high sales: 22.2222222222222 %"
[1] "Games in franchise: 22.2222222222222 %"
[1] "Percentage of high selling games ratings:"
[1] "E: 22.2222222222222 %"
[1] "EC: 0 %"
[1] "E10+: 11.1111111111111 %"
[1] "T: 44.4444444444444 %"
[1] "M: 22.2222222222222 %"
[1] "Platform Frequencies of High Sale Games:"
     PlatformGC PlatformPS2 PlatformPS3 PlatformWii PlatformX360
2470          1           1           3           3            1
[1] "Platform Frequencies"
     PlatformGC PlatformPS2 PlatformPS3 PlatformWii PlatformX360
2470          1           1           3           3            1
[1] "------------------------------------------"
[1] "Clus= 3"
[1] "Total number of games in cluster: 16"
[1] "Average Global Sales: 0.9875"
[1] "Percentages:"
[1] "High global sales: 100 %"
[1] "High NA sales: 12.5 %"
[1] "High JP sales: 0 %"
[1] "High EU sales: 0 %"
[1] "High Other sales: 12.5 %"
[1] "Games in franchise with high sales: 37.5 %"
[1] "Games in franchise: 37.5 %"
[1] "Percentage of high selling games ratings:"
[1] "E: 43.75 %"
[1] "EC: 0 %"
[1] "E10+: 12.5 %"
[1] "T: 31.25 %"
[1] "M: 12.5 %"
[1] "Platform Frequencies of High Sale Games:"
     PlatformGC PlatformPS2 PlatformPS3 PlatformWii PlatformWiiU PlatformX360
2455          1           3           6           2            1            2
     PlatformXB
2455          1
[1] "Platform Frequencies"
     PlatformGC PlatformPS2 PlatformPS3 PlatformWii PlatformWiiU PlatformX360
2455          1           3           6           2            1            2
     PlatformXB
2455          1
[1] "------------------------------------------"
[1] "Clus= 4"
[1] "Total number of games in cluster: 91"
[1] "Average Global Sales: 0.910019392372334"
[1] "Percentages:"
[1] "High global sales: 54.9450549450549 %"
[1] "High NA sales: 4.3956043956044 %"
[1] "High JP sales: 0 %"
[1] "High EU sales: 2.1978021978022 %"
[1] "High Other sales: 5.49450549450549 %"
[1] "Games in franchise with high sales: 35.1648351648352 %"
[1] "Games in franchise: 49.4505494505495 %"
[1] "Percentage of high selling games ratings:"
[1] "E: 32.967032967033 %"
[1] "EC: 0 %"
[1] "E10+: 18.6813186813187 %"
[1] "T: 28.5714285714286 %"
[1] "M: 19.7802197802198 %"
[1] "Platform Frequencies of High Sale Games:"
     Platform3DS PlatformDS PlatformGBA PlatformGC PlatformPS2 PlatformPS3
2632           1          8           1          2           4           7
     PlatformPSP PlatformWii PlatformX360 PlatformXB PlatformXOne
2632           2           8           15          1            1
[1] "Platform Frequencies"
     Platform3DS PlatformDS PlatformGBA PlatformGC PlatformPC PlatformPS2
2776           3         11           2          2          3           9
     PlatformPS3 PlatformPS4 PlatformPSP PlatformWii PlatformWiiU PlatformX360
2776          17           1           4          17            1           17
     PlatformXB PlatformXOne
2776          3            1
[1] "------------------------------------------"
[1] "Clus= 5"
[1] "Total number of games in cluster: 86"
[1] "Average Global Sales: 0.912585499316006"
[1] "Percentages:"
[1] "High global sales: 61.6279069767442 %"
[1] "High NA sales: 6.97674418604651 %"
[1] "High JP sales: 0 %"
[1] "High EU sales: 0 %"
[1] "High Other sales: 5.81395348837209 %"
[1] "Games in franchise with high sales: 38.3720930232558 %"
[1] "Games in franchise: 50 %"
[1] "Percentage of high selling games ratings:"
[1] "E: 30.2325581395349 %"
[1] "EC: 0 %"
[1] "E10+: 10.4651162790698 %"
[1] "T: 30.2325581395349 %"
[1] "M: 29.0697674418605 %"
[1] "Platform Frequencies of High Sale Games:"
     Platform3DS PlatformDS PlatformGBA PlatformGC PlatformPS2 PlatformPS3
2630           1          3           2          3          11          13
     PlatformPSV PlatformWii PlatformX360 PlatformXB
2630           1           6            9          4
[1] "Platform Frequencies"
     Platform3DS PlatformDS PlatformGBA PlatformGC PlatformPC PlatformPS2
2775           2          9           5          3          1          12
     PlatformPS3 PlatformPSP PlatformPSV PlatformWii PlatformWiiU PlatformX360
2775          18           3           1           8            1           16
     PlatformXB
2775          7
[1] "------------------------------------------"
[1] "Summary for: GenrePuzzle"
[1] "*******************************************"
[1] "Clus= 1"
[1] "Total number of games in cluster: 18"
[1] "Average Global Sales: 0.988888888888889"
[1] "Percentages:"
[1] "High global sales: 100 %"
[1] "High NA sales: 5.55555555555556 %"
[1] "High JP sales: 0 %"
[1] "High EU sales: 0 %"
[1] "High Other sales: 16.6666666666667 %"
[1] "Games in franchise with high sales: 33.3333333333333 %"
[1] "Games in franchise: 33.3333333333333 %"
[1] "Percentage of high selling games ratings:"
[1] "E: 33.3333333333333 %"
[1] "EC: 0 %"
[1] "E10+: 11.1111111111111 %"
[1] "T: 33.3333333333333 %"
[1] "M: 22.2222222222222 %"
[1] "Platform Frequencies of High Sale Games:"
     PlatformDS PlatformGC PlatformPS2 PlatformPS3 PlatformWii PlatformWiiU
2451          2          1           2           7           2            1
     PlatformX360
2451            3
[1] "Platform Frequencies"
     PlatformDS PlatformGC PlatformPS2 PlatformPS3 PlatformWii PlatformWiiU
2451          2          1           2           7           2            1
     PlatformX360
2451            3
[1] "------------------------------------------"
[1] "Clus= 2"
[1] "Total number of games in cluster: 3"
[1] "Average Global Sales: 0.992156862745098"
[1] "Percentages:"
[1] "High global sales: 100 %"
[1] "High NA sales: 0 %"
[1] "High JP sales: 0 %"
[1] "High EU sales: 0 %"
[1] "High Other sales: 0 %"
[1] "Games in franchise with high sales: 33.3333333333333 %"
[1] "Games in franchise: 33.3333333333333 %"
[1] "Percentage of high selling games ratings:"
[1] "E: 66.6666666666667 %"
[1] "EC: 0 %"
[1] "E10+: 33.3333333333333 %"
[1] "T: 0 %"
[1] "M: 0 %"
[1] "Platform Frequencies of High Sale Games:"
     PlatformWii PlatformXB
2428           2          1
[1] "Platform Frequencies"
     PlatformWii PlatformXB
2428           2          1
[1] "------------------------------------------"
[1] "Clus= 3"
[1] "Total number of games in cluster: 207"
[1] "Average Global Sales: 0.906621199204319"
[1] "Percentages:"
[1] "High global sales: 53.6231884057971 %"
[1] "High NA sales: 6.28019323671498 %"
[1] "High JP sales: 0 %"
[1] "High EU sales: 0.966183574879227 %"
[1] "High Other sales: 5.31400966183575 %"
[1] "Games in franchise with high sales: 32.8502415458937 %"
[1] "Games in franchise: 50.2415458937198 %"
[1] "Percentage of high selling games ratings:"
[1] "E: 33.3333333333333 %"
[1] "EC: 0 %"
[1] "E10+: 14.0096618357488 %"
[1] "T: 30.9178743961353 %"
[1] "M: 21.7391304347826 %"
[1] "Platform Frequencies of High Sale Games:"
     Platform3DS PlatformDS PlatformGBA PlatformGC PlatformPS2 PlatformPS3
2632           2         11           3          6          17          23
     PlatformPSP PlatformPSV PlatformWii PlatformX360 PlatformXB PlatformXOne
2632           2           1          15           25          5            1
[1] "Platform Frequencies"
     Platform3DS PlatformDS PlatformGBA PlatformGC PlatformPC PlatformPS2
2815           5         23          10          7          4          25
     PlatformPS3 PlatformPS4 PlatformPSP PlatformPSV PlatformWii PlatformWiiU
2815          43           1           7           1          29            3
     PlatformX360 PlatformXB PlatformXOne
2815           37         11            1
[1] "------------------------------------------"
[1] "Summary for: GenreRacing"
[1] "*******************************************"
[1] "Clus= 1"
[1] "Total number of games in cluster: 6"
[1] "Average Global Sales: 0.988235294117647"
[1] "Percentages:"
[1] "High global sales: 100 %"
[1] "High NA sales: 0 %"
[1] "High JP sales: 0 %"
[1] "High EU sales: 0 %"
[1] "High Other sales: 16.6666666666667 %"
[1] "Games in franchise with high sales: 16.6666666666667 %"
[1] "Games in franchise: 16.6666666666667 %"
[1] "Percentage of high selling games ratings:"
[1] "E: 50 %"
[1] "EC: 0 %"
[1] "E10+: 16.6666666666667 %"
[1] "T: 33.3333333333333 %"
[1] "M: 0 %"
[1] "Platform Frequencies of High Sale Games:"
     PlatformDS PlatformGBA PlatformGC PlatformPS3 PlatformWii PlatformXB
2466          1           1          1           1           1          1
[1] "Platform Frequencies"
     PlatformDS PlatformGBA PlatformGC PlatformPS3 PlatformWii PlatformXB
2466          1           1          1           1           1          1
[1] "------------------------------------------"
[1] "Clus= 2"
[1] "Total number of games in cluster: 43"
[1] "Average Global Sales: 0.964158686730506"
[1] "Percentages:"
[1] "High global sales: 100 %"
[1] "High NA sales: 9.30232558139535 %"
[1] "High JP sales: 0 %"
[1] "High EU sales: 0 %"
[1] "High Other sales: 6.97674418604651 %"
[1] "Games in franchise with high sales: 46.5116279069767 %"
[1] "Games in franchise: 46.5116279069767 %"
[1] "Percentage of high selling games ratings:"
[1] "E: 27.906976744186 %"
[1] "EC: 0 %"
[1] "E10+: 11.6279069767442 %"
[1] "T: 32.5581395348837 %"
[1] "M: 27.906976744186 %"
[1] "Platform Frequencies of High Sale Games:"
     Platform3DS PlatformDS PlatformGBA PlatformGC PlatformPS2 PlatformPS3
2588           2          3           1          1           6          11
     PlatformPSP PlatformWii PlatformWiiU PlatformX360 PlatformXB
2588           1           9            1            6          2
[1] "Platform Frequencies"
     Platform3DS PlatformDS PlatformGBA PlatformGC PlatformPS2 PlatformPS3
2588           2          3           1          1           6          11
     PlatformPSP PlatformWii PlatformWiiU PlatformX360 PlatformXB
2588           1           9            1            6          2
[1] "------------------------------------------"
[1] "Clus= 3"
[1] "Total number of games in cluster: 22"
[1] "Average Global Sales: 0.959358288770053"
[1] "Percentages:"
[1] "High global sales: 100 %"
[1] "High NA sales: 22.7272727272727 %"
[1] "High JP sales: 0 %"
[1] "High EU sales: 4.54545454545455 %"
[1] "High Other sales: 9.09090909090909 %"
[1] "Games in franchise with high sales: 77.2727272727273 %"
[1] "Games in franchise: 77.2727272727273 %"
[1] "Percentage of high selling games ratings:"
[1] "E: 54.5454545454545 %"
[1] "EC: 0 %"
[1] "E10+: 9.09090909090909 %"
[1] "T: 18.1818181818182 %"
[1] "M: 18.1818181818182 %"
[1] "Platform Frequencies of High Sale Games:"
     PlatformDS PlatformGC PlatformPS2 PlatformPS3 PlatformWii PlatformX360
2557          3          1           4           7           2            5
[1] "Platform Frequencies"
     PlatformDS PlatformGC PlatformPS2 PlatformPS3 PlatformWii PlatformX360
2557          3          1           4           7           2            5
[1] "------------------------------------------"
[1] "Clus= 4"
[1] "Total number of games in cluster: 220"
[1] "Average Global Sales: 0.850053475935829"
[1] "Percentages:"
[1] "High global sales: 23.6363636363636 %"
[1] "High NA sales: 2.27272727272727 %"
[1] "High JP sales: 0.909090909090909 %"
[1] "High EU sales: 0.909090909090909 %"
[1] "High Other sales: 4.54545454545455 %"
[1] "Games in franchise with high sales: 14.0909090909091 %"
[1] "Games in franchise: 48.6363636363636 %"
[1] "Percentage of high selling games ratings:"
[1] "E: 34.5454545454545 %"
[1] "EC: 0 %"
[1] "E10+: 13.1818181818182 %"
[1] "T: 33.1818181818182 %"
[1] "M: 19.0909090909091 %"
[1] "Platform Frequencies of High Sale Games:"
     PlatformDS PlatformGBA PlatformGC PlatformPS2 PlatformPS3 PlatformPSP
2632          5           1          2           9           8           1
     PlatformPSV PlatformWii PlatformX360 PlatformXB PlatformXOne
2632           1           7           14          3            1
[1] "Platform Frequencies"
     Platform3DS PlatformDS PlatformGBA PlatformGC PlatformPC PlatformPS2
3064           4         22           8          8          8          28
     PlatformPS3 PlatformPS4 PlatformPSP PlatformPSV PlatformWii PlatformWiiU
3064          39           4           9           1          26            2
     PlatformX360 PlatformXB PlatformXOne
3064           39         18            4
[1] "------------------------------------------"
[1] "Clus= 5"
[1] "Total number of games in cluster: 88"
[1] "Average Global Sales: 0.836229946524064"
[1] "Percentages:"
[1] "High global sales: 10.2272727272727 %"
[1] "High NA sales: 0 %"
[1] "High JP sales: 0 %"
[1] "High EU sales: 1.13636363636364 %"
[1] "High Other sales: 4.54545454545455 %"
[1] "Games in franchise with high sales: 6.81818181818182 %"
[1] "Games in franchise: 45.4545454545455 %"
[1] "Percentage of high selling games ratings:"
[1] "E: 37.5 %"
[1] "EC: 0 %"
[1] "E10+: 15.9090909090909 %"
[1] "T: 26.1363636363636 %"
[1] "M: 20.4545454545455 %"
[1] "Platform Frequencies of High Sale Games:"
     PlatformDS PlatformGC PlatformPS3 PlatformX360
2630          1          2           3            3
[1] "Platform Frequencies"
     Platform3DS PlatformDS PlatformGBA PlatformGC PlatformPC PlatformPS2
3058           1         12           8          7          5          10
     PlatformPS3 PlatformPSP PlatformWii PlatformWiiU PlatformX360 PlatformXB
3058          13           5           5            3           13          5
     PlatformXOne
3058            1
[1] "------------------------------------------"
[1] "Summary for: GenreRole.Playing"
[1] "*******************************************"
[1] "Clus= 1"
[1] "Total number of games in cluster: 16"
[1] "Average Global Sales: 0.972058823529412"
[1] "Percentages:"
[1] "High global sales: 100 %"
[1] "High NA sales: 6.25 %"
[1] "High JP sales: 0 %"
[1] "High EU sales: 0 %"
[1] "High Other sales: 6.25 %"
[1] "Games in franchise with high sales: 50 %"
[1] "Games in franchise: 50 %"
[1] "Percentage of high selling games ratings:"
[1] "E: 62.5 %"
[1] "EC: 0 %"
[1] "E10+: 0 %"
[1] "T: 18.75 %"
[1] "M: 18.75 %"
[1] "Platform Frequencies of High Sale Games:"
     PlatformDS PlatformGC PlatformPS2 PlatformPS3 PlatformWii PlatformX360
2558          3          1           2           3           2            2
     PlatformXB
2558          3
[1] "Platform Frequencies"
     PlatformDS PlatformGC PlatformPS2 PlatformPS3 PlatformWii PlatformX360
2558          3          1           2           3           2            2
     PlatformXB
2558          3
[1] "------------------------------------------"
[1] "Clus= 2"
[1] "Total number of games in cluster: 48"
[1] "Average Global Sales: 0.966176470588235"
[1] "Percentages:"
[1] "High global sales: 100 %"
[1] "High NA sales: 16.6666666666667 %"
[1] "High JP sales: 0 %"
[1] "High EU sales: 0 %"
[1] "High Other sales: 8.33333333333333 %"
[1] "Games in franchise with high sales: 56.25 %"
[1] "Games in franchise: 56.25 %"
[1] "Percentage of high selling games ratings:"
[1] "E: 33.3333333333333 %"
[1] "EC: 0 %"
[1] "E10+: 12.5 %"
[1] "T: 33.3333333333333 %"
[1] "M: 20.8333333333333 %"
[1] "Platform Frequencies of High Sale Games:"
     Platform3DS PlatformDS PlatformGBA PlatformGC PlatformPS2 PlatformPS3
2566           1          2           2          1          10          15
     PlatformPSP PlatformWii PlatformX360
2566           1          10            6
[1] "Platform Frequencies"
     Platform3DS PlatformDS PlatformGBA PlatformGC PlatformPS2 PlatformPS3
2566           1          2           2          1          10          15
     PlatformPSP PlatformWii PlatformX360
2566           1          10            6
[1] "------------------------------------------"
[1] "Clus= 3"
[1] "Total number of games in cluster: 7"
[1] "Average Global Sales: 0.983193277310924"
[1] "Percentages:"
[1] "High global sales: 100 %"
[1] "High NA sales: 0 %"
[1] "High JP sales: 0 %"
[1] "High EU sales: 0 %"
[1] "High Other sales: 14.2857142857143 %"
[1] "Games in franchise with high sales: 28.5714285714286 %"
[1] "Games in franchise: 28.5714285714286 %"
[1] "Percentage of high selling games ratings:"
[1] "E: 28.5714285714286 %"
[1] "EC: 0 %"
[1] "E10+: 0 %"
[1] "T: 28.5714285714286 %"
[1] "M: 42.8571428571429 %"
[1] "Platform Frequencies of High Sale Games:"
     PlatformDS PlatformPS2 PlatformPS3 PlatformWiiU PlatformX360 PlatformXB
2479          1           1           2            1            1          1
[1] "Platform Frequencies"
     PlatformDS PlatformPS2 PlatformPS3 PlatformWiiU PlatformX360 PlatformXB
2479          1           1           2            1            1          1
[1] "------------------------------------------"
[1] "Clus= 4"
[1] "Total number of games in cluster: 19"
[1] "Average Global Sales: 0.85077399380805"
[1] "Percentages:"
[1] "High global sales: 21.0526315789474 %"
[1] "High NA sales: 5.26315789473684 %"
[1] "High JP sales: 0 %"
[1] "High EU sales: 0 %"
[1] "High Other sales: 0 %"
[1] "Games in franchise with high sales: 0 %"
[1] "Games in franchise: 36.8421052631579 %"
[1] "Percentage of high selling games ratings:"
[1] "E: 42.1052631578947 %"
[1] "EC: 0 %"
[1] "E10+: 5.26315789473684 %"
[1] "T: 36.8421052631579 %"
[1] "M: 15.7894736842105 %"
[1] "Platform Frequencies of High Sale Games:"
     PlatformDS PlatformPS2 PlatformPS3 PlatformX360
2553          1           1           1            1
[1] "Platform Frequencies"
     Platform3DS PlatformDS PlatformGBA PlatformPS2 PlatformPS3 PlatformPSP
3000           1          1           2           2           6           1
     PlatformWii PlatformX360 PlatformXB
3000           1            2          3
[1] "------------------------------------------"
[1] "Clus= 5"
[1] "Total number of games in cluster: 276"
[1] "Average Global Sales: 0.84846547314578"
[1] "Percentages:"
[1] "High global sales: 20.6521739130435 %"
[1] "High NA sales: 1.44927536231884 %"
[1] "High JP sales: 0.72463768115942 %"
[1] "High EU sales: 1.44927536231884 %"
[1] "High Other sales: 5.07246376811594 %"
[1] "Games in franchise with high sales: 13.768115942029 %"
[1] "Games in franchise: 48.9130434782609 %"
[1] "Percentage of high selling games ratings:"
[1] "E: 35.1449275362319 %"
[1] "EC: 0 %"
[1] "E10+: 15.2173913043478 %"
[1] "T: 29.7101449275362 %"
[1] "M: 19.9275362318841 %"
[1] "Platform Frequencies of High Sale Games:"
     Platform3DS PlatformDS PlatformGBA PlatformGC PlatformPS2 PlatformPS3
2632           1          6           1          5           5           9
     PlatformPSP PlatformPSV PlatformWii PlatformX360 PlatformXB PlatformXOne
2632           1           1           7           18          2            1
[1] "Platform Frequencies"
     Platform3DS PlatformDS PlatformGBA PlatformGC PlatformPC PlatformPS2
3044           5         34          12         15         11          31
     PlatformPS3 PlatformPS4 PlatformPSP PlatformPSV PlatformWii PlatformWiiU
3044          43           4          12           1          29            4
     PlatformX360 PlatformXB PlatformXOne
3044           51         19            5
[1] "------------------------------------------"
[1] "Summary for: GenreShooter"
[1] "*******************************************"
[1] "Clus= 1"
[1] "Total number of games in cluster: 122"
[1] "Average Global Sales: 0.951012536162006"
[1] "Percentages:"
[1] "High global sales: 95.9016393442623 %"
[1] "High NA sales: 11.4754098360656 %"
[1] "High JP sales: 0 %"
[1] "High EU sales: 1.63934426229508 %"
[1] "High Other sales: 7.37704918032787 %"
[1] "Games in franchise with high sales: 54.0983606557377 %"
[1] "Games in franchise: 54.0983606557377 %"
[1] "Percentage of high selling games ratings:"
[1] "E: 34.4262295081967 %"
[1] "EC: 0 %"
[1] "E10+: 11.4754098360656 %"
[1] "T: 33.6065573770492 %"
[1] "M: 20.4918032786885 %"
[1] "Platform Frequencies of High Sale Games:"
     Platform3DS PlatformDS PlatformGBA PlatformGC PlatformPS2 PlatformPS3
2632           2         11           2          6          18          27
     PlatformPSP PlatformPSV PlatformWii PlatformWiiU PlatformX360 PlatformXB
2632           1           1          19            1           23          5
     PlatformXOne
2632            1
[1] "Platform Frequencies"
     Platform3DS PlatformDS PlatformGBA PlatformGC PlatformPS2 PlatformPS3
2666           2         12           3          6          19          27
     PlatformPSP PlatformPSV PlatformWii PlatformWiiU PlatformX360 PlatformXB
2666           1           1          20            1           24          5
     PlatformXOne
2666            1
[1] "------------------------------------------"
[1] "Clus= 2"
[1] "Total number of games in cluster: 348"
[1] "Average Global Sales: 0.805882352941176"
[1] "Percentages:"
[1] "High global sales: 4.31034482758621 %"
[1] "High NA sales: 0 %"
[1] "High JP sales: 1.14942528735632 %"
[1] "High EU sales: 0.862068965517241 %"
[1] "High Other sales: 4.02298850574713 %"
[1] "Games in franchise with high sales: 2.58620689655172 %"
[1] "Games in franchise: 45.9770114942529 %"
[1] "Percentage of high selling games ratings:"
[1] "E: 35.9195402298851 %"
[1] "EC: 0 %"
[1] "E10+: 13.5057471264368 %"
[1] "T: 31.3218390804598 %"
[1] "M: 19.2528735632184 %"
[1] "Platform Frequencies of High Sale Games:"
     PlatformDS PlatformGBA PlatformGC PlatformPS2 PlatformPS3 PlatformPSP
2630          2           1          1           1           3           1
     PlatformX360 PlatformXB
2630            5          1
[1] "Platform Frequencies"
     Platform3DS PlatformDS PlatformGBA PlatformGC PlatformPC PlatformPS2
3218           7         34          20         15         19          46
     PlatformPS3 PlatformPS4 PlatformPSP PlatformPSV PlatformWii PlatformWiiU
3218          58           4          20           2          32            6
     PlatformX360 PlatformXB PlatformXOne
3218           52         28            5
[1] "------------------------------------------"
[1] "Summary for: GenreSimulation"
[1] "*******************************************"
[1] "Clus= 1"
[1] "Total number of games in cluster: 44"
[1] "Average Global Sales: 0.977540106951872"
[1] "Percentages:"
[1] "High global sales: 100 %"
[1] "High NA sales: 11.3636363636364 %"
[1] "High JP sales: 0 %"
[1] "High EU sales: 0 %"
[1] "High Other sales: 11.3636363636364 %"
[1] "Games in franchise with high sales: 45.4545454545455 %"
[1] "Games in franchise: 45.4545454545455 %"
[1] "Percentage of high selling games ratings:"
[1] "E: 36.3636363636364 %"
[1] "EC: 0 %"
[1] "E10+: 13.6363636363636 %"
[1] "T: 27.2727272727273 %"
[1] "M: 22.7272727272727 %"
[1] "Platform Frequencies of High Sale Games:"
     PlatformDS PlatformGBA PlatformGC PlatformPS2 PlatformPS3 PlatformPSP
2551          3           1          2           9          13           1
     PlatformWii PlatformWiiU PlatformX360 PlatformXB
2551           6            1            7          1
[1] "Platform Frequencies"
     PlatformDS PlatformGBA PlatformGC PlatformPS2 PlatformPS3 PlatformPSP
2551          3           1          2           9          13           1
     PlatformWii PlatformWiiU PlatformX360 PlatformXB
2551           6            1            7          1
[1] "------------------------------------------"
[1] "Clus= 2"
[1] "Total number of games in cluster: 210"
[1] "Average Global Sales: 0.858991596638655"
[1] "Percentages:"
[1] "High global sales: 30.4761904761905 %"
[1] "High NA sales: 3.80952380952381 %"
[1] "High JP sales: 0.952380952380952 %"
[1] "High EU sales: 0.476190476190476 %"
[1] "High Other sales: 5.23809523809524 %"
[1] "Games in franchise with high sales: 18.0952380952381 %"
[1] "Games in franchise: 49.5238095238095 %"
[1] "Percentage of high selling games ratings:"
[1] "E: 38.0952380952381 %"
[1] "EC: 0 %"
[1] "E10+: 12.3809523809524 %"
[1] "T: 32.8571428571429 %"
[1] "M: 16.6666666666667 %"
[1] "Platform Frequencies of High Sale Games:"
     Platform3DS PlatformDS PlatformGBA PlatformGC PlatformPS2 PlatformPS3
2630           2          8           2          4           8          14
     PlatformPSP PlatformWii PlatformX360 PlatformXB PlatformXOne
2630           1           7           14          3            1
[1] "Platform Frequencies"
     Platform3DS PlatformDS PlatformGBA PlatformGC PlatformPC PlatformPS2
3067           5         24          10         12         10          21
     PlatformPS3 PlatformPS4 PlatformPSP PlatformWii PlatformWiiU PlatformX360
3067          40           2          10          20            2           37
     PlatformXB PlatformXOne
3067         13            4
[1] "------------------------------------------"
[1] "Clus= 3"
[1] "Total number of games in cluster: 12"
[1] "Average Global Sales: 0.945098039215686"
[1] "Percentages:"
[1] "High global sales: 100 %"
[1] "High NA sales: 8.33333333333333 %"
[1] "High JP sales: 0 %"
[1] "High EU sales: 8.33333333333333 %"
[1] "High Other sales: 0 %"
[1] "Games in franchise with high sales: 75 %"
[1] "Games in franchise: 75 %"
[1] "Percentage of high selling games ratings:"
[1] "E: 16.6666666666667 %"
[1] "EC: 0 %"
[1] "E10+: 16.6666666666667 %"
[1] "T: 33.3333333333333 %"
[1] "M: 33.3333333333333 %"
[1] "Platform Frequencies of High Sale Games:"
     PlatformDS PlatformGC PlatformPS2 PlatformPS3 PlatformWii PlatformX360
2622          1          1           1           1           6            1
     PlatformXB
2622          1
[1] "Platform Frequencies"
     PlatformDS PlatformGC PlatformPS2 PlatformPS3 PlatformWii PlatformX360
2622          1          1           1           1           6            1
     PlatformXB
2622          1
[1] "------------------------------------------"
[1] "Clus= 4"
[1] "Total number of games in cluster: 114"
[1] "Average Global Sales: 0.834365325077399"
[1] "Percentages:"
[1] "High global sales: 10.5263157894737 %"
[1] "High NA sales: 0 %"
[1] "High JP sales: 0 %"
[1] "High EU sales: 1.75438596491228 %"
[1] "High Other sales: 3.50877192982456 %"
[1] "Games in franchise with high sales: 7.01754385964912 %"
[1] "Games in franchise: 45.6140350877193 %"
[1] "Percentage of high selling games ratings:"
[1] "E: 33.3333333333333 %"
[1] "EC: 0 %"
[1] "E10+: 15.7894736842105 %"
[1] "T: 27.1929824561404 %"
[1] "M: 23.6842105263158 %"
[1] "Platform Frequencies of High Sale Games:"
     PlatformDS PlatformPS2 PlatformPS3 PlatformPSV PlatformX360 PlatformXB
2632          1           1           2           1            6          1
[1] "Platform Frequencies"
     Platform3DS PlatformDS PlatformGBA PlatformGC PlatformPC PlatformPS2
3062           2         13           7          3          3          17
     PlatformPS3 PlatformPS4 PlatformPSP PlatformPSV PlatformWii PlatformWiiU
3062          18           2           4           1          11            3
     PlatformX360 PlatformXB PlatformXOne
3062           18         11            1
[1] "------------------------------------------"
[1] "Summary for: GenreSports"
[1] "*******************************************"
[1] "Clus= 1"
[1] "Total number of games in cluster: 63"
[1] "Average Global Sales: 0.922875816993464"
[1] "Percentages:"
[1] "High global sales: 71.4285714285714 %"
[1] "High NA sales: 12.6984126984127 %"
[1] "High JP sales: 0 %"
[1] "High EU sales: 0 %"
[1] "High Other sales: 6.34920634920635 %"
[1] "Games in franchise with high sales: 39.6825396825397 %"
[1] "Games in franchise: 47.6190476190476 %"
[1] "Percentage of high selling games ratings:"
[1] "E: 36.5079365079365 %"
[1] "EC: 0 %"
[1] "E10+: 12.6984126984127 %"
[1] "T: 30.1587301587302 %"
[1] "M: 20.6349206349206 %"
[1] "Platform Frequencies of High Sale Games:"
     PlatformDS PlatformGC PlatformPS2 PlatformPS3 PlatformPSP PlatformWii
2630          6          2           7          13           1           6
     PlatformX360 PlatformXB
2630            9          1
[1] "Platform Frequencies"
     Platform3DS PlatformDS PlatformGBA PlatformGC PlatformPS2 PlatformPS3
2920           1          9           1          2           9          16
     PlatformPSP PlatformWii PlatformX360 PlatformXB
2920           2           7           11          5
[1] "------------------------------------------"
[1] "Clus= 2"
[1] "Total number of games in cluster: 60"
[1] "Average Global Sales: 0.957647058823529"
[1] "Percentages:"
[1] "High global sales: 98.3333333333333 %"
[1] "High NA sales: 8.33333333333333 %"
[1] "High JP sales: 0 %"
[1] "High EU sales: 0 %"
[1] "High Other sales: 6.66666666666667 %"
[1] "Games in franchise with high sales: 51.6666666666667 %"
[1] "Games in franchise: 51.6666666666667 %"
[1] "Percentage of high selling games ratings:"
[1] "E: 28.3333333333333 %"
[1] "EC: 0 %"
[1] "E10+: 8.33333333333333 %"
[1] "T: 35 %"
[1] "M: 28.3333333333333 %"
[1] "Platform Frequencies of High Sale Games:"
     Platform3DS PlatformDS PlatformGBA PlatformGC PlatformPS2 PlatformPS3
2632           1          3           3          2           9          13
     PlatformPSP PlatformPSV PlatformWii PlatformWiiU PlatformX360 PlatformXB
2632           1           1          10            1           13          2
[1] "Platform Frequencies"
     Platform3DS PlatformDS PlatformGBA PlatformGC PlatformPS2 PlatformPS3
2639           1          3           3          2           9          13
     PlatformPSP PlatformPSV PlatformWii PlatformWiiU PlatformX360 PlatformXB
2639           1           1          11            1           13          2
[1] "------------------------------------------"
[1] "Clus= 3"
[1] "Total number of games in cluster: 430"
[1] "Average Global Sales: 0.760246238030096"
[1] "Percentages:"
[1] "High global sales: 6.51162790697674 %"
[1] "High NA sales: 0.232558139534884 %"
[1] "High JP sales: 1.16279069767442 %"
[1] "High EU sales: 0.930232558139535 %"
[1] "High Other sales: 4.18604651162791 %"
[1] "Games in franchise with high sales: 4.41860465116279 %"
[1] "Games in franchise: 49.0697674418605 %"
[1] "Percentage of high selling games ratings:"
[1] "E: 37.906976744186 %"
[1] "EC: 0 %"
[1] "E10+: 16.5116279069767 %"
[1] "T: 29.5348837209302 %"
[1] "M: 16.046511627907 %"
[1] "Platform Frequencies of High Sale Games:"
     Platform3DS PlatformDS PlatformGC PlatformPS2 PlatformPS3 PlatformWii
2628           1          4          3           3           4           3
     PlatformX360 PlatformXB PlatformXOne
2628            6          3            1
[1] "Platform Frequencies"
     Platform3DS PlatformDS PlatformGBA PlatformGC PlatformPC PlatformPS2
3588          10         41          24         21         20          67
     PlatformPS3 PlatformPS4 PlatformPSP PlatformPSV PlatformWii PlatformWiiU
3588          73           4          21           3          45            7
     PlatformX360 PlatformXB PlatformXOne
3588           60         28            6
[1] "------------------------------------------"
[1] "Clus= 4"
[1] "Total number of games in cluster: 144"
[1] "Average Global Sales: 0.750571895424837"
[1] "Percentages:"
[1] "High global sales: 0 %"
[1] "High NA sales: 0 %"
[1] "High JP sales: 0 %"
[1] "High EU sales: 0.694444444444444 %"
[1] "High Other sales: 1.38888888888889 %"
[1] "Games in franchise with high sales: 0 %"
[1] "Games in franchise: 46.5277777777778 %"
[1] "Percentage of high selling games ratings:"
[1] "E: 36.8055555555556 %"
[1] "EC: 0 %"
[1] "E10+: 14.5833333333333 %"
[1] "T: 30.5555555555556 %"
[1] "M: 18.0555555555556 %"
[1] "Platform Frequencies of High Sale Games:"
data frame with 0 columns and 0 rows
[1] "Platform Frequencies"
     Platform3DS PlatformDS PlatformGBA PlatformGC PlatformPC PlatformPS2
3590           3         13          11          3          4          21
     PlatformPS3 PlatformPS4 PlatformPSP PlatformPSV PlatformWii PlatformWiiU
3590          20           3           5           2          17            2
     PlatformX360 PlatformXB PlatformXOne
3590           24         14            2
[1] "------------------------------------------"
[1] "Summary for: GenreStrategy"
[1] "*******************************************"
[1] "Clus= 1"
[1] "Total number of games in cluster: 6"
[1] "Average Global Sales: 0.994117647058824"
[1] "Percentages:"
[1] "High global sales: 100 %"
[1] "High NA sales: 0 %"
[1] "High JP sales: 0 %"
[1] "High EU sales: 0 %"
[1] "High Other sales: 0 %"
[1] "Games in franchise with high sales: 16.6666666666667 %"
[1] "Games in franchise: 16.6666666666667 %"
[1] "Percentage of high selling games ratings:"
[1] "E: 33.3333333333333 %"
[1] "EC: 0 %"
[1] "E10+: 33.3333333333333 %"
[1] "T: 16.6666666666667 %"
[1] "M: 16.6666666666667 %"
[1] "Platform Frequencies of High Sale Games:"
     PlatformDS PlatformPS3 PlatformWii
2433          1           2           3
[1] "Platform Frequencies"
     PlatformDS PlatformPS3 PlatformWii
2433          1           2           3
[1] "------------------------------------------"
[1] "Clus= 2"
[1] "Total number of games in cluster: 11"
[1] "Average Global Sales: 0.988235294117647"
[1] "Percentages:"
[1] "High global sales: 100 %"
[1] "High NA sales: 18.1818181818182 %"
[1] "High JP sales: 0 %"
[1] "High EU sales: 0 %"
[1] "High Other sales: 9.09090909090909 %"
[1] "Games in franchise with high sales: 54.5454545454545 %"
[1] "Games in franchise: 54.5454545454545 %"
[1] "Percentage of high selling games ratings:"
[1] "E: 54.5454545454545 %"
[1] "EC: 0 %"
[1] "E10+: 9.09090909090909 %"
[1] "T: 36.3636363636364 %"
[1] "M: 0 %"
[1] "Platform Frequencies of High Sale Games:"
     PlatformDS PlatformGC PlatformPS2 PlatformPS3 PlatformWii PlatformX360
2453          1          1           2           2           1            3
     PlatformXB
2453          1
[1] "Platform Frequencies"
     PlatformDS PlatformGC PlatformPS2 PlatformPS3 PlatformWii PlatformX360
2453          1          1           2           2           1            3
     PlatformXB
2453          1
[1] "------------------------------------------"
[1] "Clus= 3"
[1] "Total number of games in cluster: 165"
[1] "Average Global Sales: 0.908449197860963"
[1] "Percentages:"
[1] "High global sales: 53.3333333333333 %"
[1] "High NA sales: 5.45454545454545 %"
[1] "High JP sales: 0 %"
[1] "High EU sales: 1.21212121212121 %"
[1] "High Other sales: 7.87878787878788 %"
[1] "Games in franchise with high sales: 30.3030303030303 %"
[1] "Games in franchise: 46.0606060606061 %"
[1] "Percentage of high selling games ratings:"
[1] "E: 29.6969696969697 %"
[1] "EC: 0 %"
[1] "E10+: 13.9393939393939 %"
[1] "T: 31.5151515151515 %"
[1] "M: 24.8484848484848 %"
[1] "Platform Frequencies of High Sale Games:"
     Platform3DS PlatformDS PlatformGC PlatformPS2 PlatformPS3 PlatformPSP
2632           2          8          2          16          21           2
     PlatformPSV PlatformWii PlatformWiiU PlatformX360 PlatformXB
2632           1          11            1           20          4
[1] "Platform Frequencies"
     Platform3DS PlatformDS PlatformGBA PlatformGC PlatformPC PlatformPS2
2804           5         16           3          2          3          22
     PlatformPS3 PlatformPS4 PlatformPSP PlatformPSV PlatformWii PlatformWiiU
2804          38           1           6           1          24            3
     PlatformX360 PlatformXB
2804           31         10
[1] "------------------------------------------"
[1] "Clus= 4"
[1] "Total number of games in cluster: 37"
[1] "Average Global Sales: 0.923370429252782"
[1] "Percentages:"
[1] "High global sales: 72.972972972973 %"
[1] "High NA sales: 8.10810810810811 %"
[1] "High JP sales: 0 %"
[1] "High EU sales: 0 %"
[1] "High Other sales: 0 %"
[1] "Games in franchise with high sales: 48.6486486486487 %"
[1] "Games in franchise: 59.4594594594595 %"
[1] "Percentage of high selling games ratings:"
[1] "E: 43.2432432432432 %"
[1] "EC: 0 %"
[1] "E10+: 10.8108108108108 %"
[1] "T: 27.027027027027 %"
[1] "M: 18.9189189189189 %"
[1] "Platform Frequencies of High Sale Games:"
     PlatformDS PlatformGBA PlatformGC PlatformPS2 PlatformPS3 PlatformWii
2628          3           3          4           1           5           4
     PlatformX360 PlatformXB PlatformXOne
2628            5          1            1
[1] "Platform Frequencies"
     PlatformDS PlatformGBA PlatformGC PlatformPC PlatformPS2 PlatformPS3
2776          5           5          4          1           2           7
     PlatformPSP PlatformWii PlatformX360 PlatformXB PlatformXOne
2776           1           4            6          1            1
[1] "------------------------------------------"
In [ ]:
genreHierarchicalClustering(clustering_dataset, genres, clusterNums, 
  gamesForClustering, "NASales", "EUSales")
[1] "Summary for: GenreAction"
[1] "*******************************************"
[1] "Clus= 1"
[1] "Total number of games in cluster: 212"
[1] "Average Global Sales: 0.886126526082131"
[1] "Percentages:"
[1] "High global sales: 41.0377358490566 %"
[1] "High NA sales: 3.77358490566038 %"
[1] "High JP sales: 0.943396226415094 %"
[1] "High EU sales: 1.41509433962264 %"
[1] "High Other sales: 5.66037735849057 %"
[1] "Games in franchise with high sales: 22.1698113207547 %"
[1] "Games in franchise: 45.7547169811321 %"
[1] "Percentage of high selling games ratings:"
[1] "E: 35.8490566037736 %"
[1] "EC: 0 %"
[1] "E10+: 9.90566037735849 %"
[1] "T: 32.0754716981132 %"
[1] "M: 22.1698113207547 %"
[1] "Platform Frequencies of High Sale Games:"
     Platform3DS PlatformDS PlatformGBA PlatformGC PlatformPS2 PlatformPS3
2632           1         11           2          5          14          20
     PlatformPSP PlatformWii PlatformWiiU PlatformX360 PlatformXB PlatformXOne
2632           1           9            1           20          2            1
[1] "Platform Frequencies"
     Platform3DS PlatformDS PlatformGBA PlatformGC PlatformPC PlatformPS2
3197           4         26          11          9          8          25
     PlatformPS3 PlatformPS4 PlatformPSP PlatformWii PlatformWiiU PlatformX360
3197          41           3           8          20            3           42
     PlatformXB PlatformXOne
3197         10            2
[1] "------------------------------------------"
[1] "Clus= 2"
[1] "Total number of games in cluster: 71"
[1] "Average Global Sales: 0.901242750621375"
[1] "Percentages:"
[1] "High global sales: 52.112676056338 %"
[1] "High NA sales: 7.04225352112676 %"
[1] "High JP sales: 0 %"
[1] "High EU sales: 0 %"
[1] "High Other sales: 4.22535211267606 %"
[1] "Games in franchise with high sales: 33.8028169014084 %"
[1] "Games in franchise: 56.3380281690141 %"
[1] "Percentage of high selling games ratings:"
[1] "E: 42.2535211267606 %"
[1] "EC: 0 %"
[1] "E10+: 19.7183098591549 %"
[1] "T: 22.5352112676056 %"
[1] "M: 15.4929577464789 %"
[1] "Platform Frequencies of High Sale Games:"
     PlatformDS PlatformGBA PlatformGC PlatformPS2 PlatformPS3 PlatformPSP
2625          1           1          2           5           9           1
     PlatformPSV PlatformWii PlatformX360 PlatformXB
2625           1           8            6          3
[1] "Platform Frequencies"
     Platform3DS PlatformDS PlatformGBA PlatformGC PlatformPC PlatformPS2
3123           2          6           3          3          1          10
     PlatformPS3 PlatformPSP PlatformPSV PlatformWii PlatformWiiU PlatformX360
3123          13           3           1          12            2           10
     PlatformXB
3123          5
[1] "------------------------------------------"
[1] "Clus= 3"
[1] "Total number of games in cluster: 20"
[1] "Average Global Sales: 0.858235294117647"
[1] "Percentages:"
[1] "High global sales: 40 %"
[1] "High NA sales: 5 %"
[1] "High JP sales: 0 %"
[1] "High EU sales: 0 %"
[1] "High Other sales: 5 %"
[1] "Games in franchise with high sales: 20 %"
[1] "Games in franchise: 60 %"
[1] "Percentage of high selling games ratings:"
[1] "E: 35 %"
[1] "EC: 0 %"
[1] "E10+: 20 %"
[1] "T: 25 %"
[1] "M: 20 %"
[1] "Platform Frequencies of High Sale Games:"
     Platform3DS PlatformDS PlatformPS3 PlatformWii PlatformX360 PlatformXB
2624           1          1           1           2            2          1
[1] "Platform Frequencies"
     Platform3DS PlatformDS PlatformPS3 PlatformPS4 PlatformPSP PlatformWii
3227           1          4           3           1           1           4
     PlatformX360 PlatformXB PlatformXOne
3227            3          2            1
[1] "------------------------------------------"
[1] "Clus= 4"
[1] "Total number of games in cluster: 750"
[1] "Average Global Sales: 0.655027450980392"
[1] "Percentages:"
[1] "High global sales: 0 %"
[1] "High NA sales: 0 %"
[1] "High JP sales: 0.4 %"
[1] "High EU sales: 0.266666666666667 %"
[1] "High Other sales: 1.86666666666667 %"
[1] "Games in franchise with high sales: 0 %"
[1] "Games in franchise: 46.8 %"
[1] "Percentage of high selling games ratings:"
[1] "E: 39.3333333333333 %"
[1] "EC: 0 %"
[1] "E10+: 15.6 %"
[1] "T: 28.8 %"
[1] "M: 16.2666666666667 %"
[1] "Platform Frequencies of High Sale Games:"
data frame with 0 columns and 0 rows
[1] "Platform Frequencies"
     Platform3DS PlatformDS PlatformGBA PlatformGC PlatformPC PlatformPS2
4177          18         77          40         24         25         138
     PlatformPS3 PlatformPS4 PlatformPSP PlatformPSV PlatformWii PlatformWiiU
4177         108           4          34          10          93            6
     PlatformX360 PlatformXB PlatformXOne
4177          106         59            8
[1] "------------------------------------------"
[1] "Summary for: GenreAdventure"
[1] "*******************************************"
[1] "Clus= 1"
[1] "Total number of games in cluster: 9"
[1] "Average Global Sales: 0.992156862745098"
[1] "Percentages:"
[1] "High global sales: 100 %"
[1] "High NA sales: 22.2222222222222 %"
[1] "High JP sales: 0 %"
[1] "High EU sales: 0 %"
[1] "High Other sales: 0 %"
[1] "Games in franchise with high sales: 55.5555555555556 %"
[1] "Games in franchise: 55.5555555555556 %"
[1] "Percentage of high selling games ratings:"
[1] "E: 44.4444444444444 %"
[1] "EC: 0 %"
[1] "E10+: 11.1111111111111 %"
[1] "T: 33.3333333333333 %"
[1] "M: 11.1111111111111 %"
[1] "Platform Frequencies of High Sale Games:"
     PlatformDS PlatformPS2 PlatformPS3 PlatformWii PlatformX360
2443          1           2           3           1            2
[1] "Platform Frequencies"
     PlatformDS PlatformPS2 PlatformPS3 PlatformWii PlatformX360
2443          1           2           3           1            2
[1] "------------------------------------------"
[1] "Clus= 2"
[1] "Total number of games in cluster: 110"
[1] "Average Global Sales: 0.905026737967914"
[1] "Percentages:"
[1] "High global sales: 52.7272727272727 %"
[1] "High NA sales: 7.27272727272727 %"
[1] "High JP sales: 0 %"
[1] "High EU sales: 0 %"
[1] "High Other sales: 5.45454545454545 %"
[1] "Games in franchise with high sales: 29.0909090909091 %"
[1] "Games in franchise: 51.8181818181818 %"
[1] "Percentage of high selling games ratings:"
[1] "E: 40.9090909090909 %"
[1] "EC: 0 %"
[1] "E10+: 10.9090909090909 %"
[1] "T: 27.2727272727273 %"
[1] "M: 20.9090909090909 %"
[1] "Platform Frequencies of High Sale Games:"
     Platform3DS PlatformDS PlatformGC PlatformPS2 PlatformPS3 PlatformPSP
2632           1          7          4           9          11           2
     PlatformWii PlatformWiiU PlatformX360 PlatformXB
2632           8            1           10          5
[1] "Platform Frequencies"
     Platform3DS PlatformDS PlatformGBA PlatformGC PlatformPC PlatformPS2
2904           4         13           3          5          1          15
     PlatformPS3 PlatformPSP PlatformWii PlatformWiiU PlatformX360 PlatformXB
2904          18           6          15            2           19          9
[1] "------------------------------------------"
[1] "Clus= 3"
[1] "Total number of games in cluster: 164"
[1] "Average Global Sales: 0.886441893830703"
[1] "Percentages:"
[1] "High global sales: 39.6341463414634 %"
[1] "High NA sales: 2.4390243902439 %"
[1] "High JP sales: 0.609756097560976 %"
[1] "High EU sales: 1.21951219512195 %"
[1] "High Other sales: 6.09756097560976 %"
[1] "Games in franchise with high sales: 23.1707317073171 %"
[1] "Games in franchise: 47.5609756097561 %"
[1] "Percentage of high selling games ratings:"
[1] "E: 34.7560975609756 %"
[1] "EC: 0 %"
[1] "E10+: 12.8048780487805 %"
[1] "T: 31.0975609756098 %"
[1] "M: 21.3414634146341 %"
[1] "Platform Frequencies of High Sale Games:"
     Platform3DS PlatformDS PlatformGBA PlatformGC PlatformPS2 PlatformPS3
2630           1          5           3          3           8          16
     PlatformPSV PlatformWii PlatformX360 PlatformXB PlatformXOne
2630           1          10           16          1            1
[1] "Platform Frequencies"
     Platform3DS PlatformDS PlatformGBA PlatformGC PlatformPC PlatformPS2
2906           2         18           9          7          6          17
     PlatformPS3 PlatformPS4 PlatformPSP PlatformPSV PlatformWii PlatformWiiU
2906          35           2           4           1          20            3
     PlatformX360 PlatformXB PlatformXOne
2906           31          8            1
[1] "------------------------------------------"
[1] "Summary for: GenreFighting"
[1] "*******************************************"
[1] "Clus= 1"
[1] "Total number of games in cluster: 27"
[1] "Average Global Sales: 0.987363834422658"
[1] "Percentages:"
[1] "High global sales: 100 %"
[1] "High NA sales: 7.40740740740741 %"
[1] "High JP sales: 0 %"
[1] "High EU sales: 0 %"
[1] "High Other sales: 11.1111111111111 %"
[1] "Games in franchise with high sales: 40.7407407407407 %"
[1] "Games in franchise: 40.7407407407407 %"
[1] "Percentage of high selling games ratings:"
[1] "E: 40.7407407407407 %"
[1] "EC: 0 %"
[1] "E10+: 11.1111111111111 %"
[1] "T: 25.9259259259259 %"
[1] "M: 22.2222222222222 %"
[1] "Platform Frequencies of High Sale Games:"
     PlatformDS PlatformGC PlatformPS2 PlatformPS3 PlatformWii PlatformWiiU
2459          3          1           4           8           5            1
     PlatformX360 PlatformXB
2459            4          1
[1] "Platform Frequencies"
     PlatformDS PlatformGC PlatformPS2 PlatformPS3 PlatformWii PlatformWiiU
2459          3          1           4           8           5            1
     PlatformX360 PlatformXB
2459            4          1
[1] "------------------------------------------"
[1] "Clus= 2"
[1] "Total number of games in cluster: 162"
[1] "Average Global Sales: 0.91757443718228"
[1] "Percentages:"
[1] "High global sales: 64.8148148148148 %"
[1] "High NA sales: 7.40740740740741 %"
[1] "High JP sales: 0 %"
[1] "High EU sales: 1.23456790123457 %"
[1] "High Other sales: 4.93827160493827 %"
[1] "Games in franchise with high sales: 39.5061728395062 %"
[1] "Games in franchise: 50.6172839506173 %"
[1] "Percentage of high selling games ratings:"
[1] "E: 32.7160493827161 %"
[1] "EC: 0 %"
[1] "E10+: 14.1975308641975 %"
[1] "T: 31.4814814814815 %"
[1] "M: 21.6049382716049 %"
[1] "Platform Frequencies of High Sale Games:"
     Platform3DS PlatformDS PlatformGBA PlatformGC PlatformPS2 PlatformPS3
2632           2         10           3          6          15          22
     PlatformPSP PlatformPSV PlatformWii PlatformX360 PlatformXB PlatformXOne
2632           2           1          14           24          5            1
[1] "Platform Frequencies"
     Platform3DS PlatformDS PlatformGBA PlatformGC PlatformPC PlatformPS2
2750           5         19           6          6          1          21
     PlatformPS3 PlatformPS4 PlatformPSP PlatformPSV PlatformWii PlatformWiiU
2750          30           1           6           1          24            1
     PlatformX360 PlatformXB PlatformXOne
2750           32          8            1
[1] "------------------------------------------"
[1] "Summary for: GenreMisc"
[1] "*******************************************"
[1] "Clus= 1"
[1] "Total number of games in cluster: 37"
[1] "Average Global Sales: 0.977424483306836"
[1] "Percentages:"
[1] "High global sales: 100 %"
[1] "High NA sales: 8.10810810810811 %"
[1] "High JP sales: 0 %"
[1] "High EU sales: 0 %"
[1] "High Other sales: 2.7027027027027 %"
[1] "Games in franchise with high sales: 43.2432432432432 %"
[1] "Games in franchise: 43.2432432432432 %"
[1] "Percentage of high selling games ratings:"
[1] "E: 35.1351351351351 %"
[1] "EC: 0 %"
[1] "E10+: 10.8108108108108 %"
[1] "T: 27.027027027027 %"
[1] "M: 27.027027027027 %"
[1] "Platform Frequencies of High Sale Games:"
     PlatformDS PlatformGBA PlatformGC PlatformPS2 PlatformPS3 PlatformWii
2521          4           1          2           6          10           6
     PlatformWiiU PlatformX360 PlatformXB
2521            1            5          2
[1] "Platform Frequencies"
     PlatformDS PlatformGBA PlatformGC PlatformPS2 PlatformPS3 PlatformWii
2521          4           1          2           6          10           6
     PlatformWiiU PlatformX360 PlatformXB
2521            1            5          2
[1] "------------------------------------------"
[1] "Clus= 2"
[1] "Total number of games in cluster: 8"
[1] "Average Global Sales: 0.977941176470588"
[1] "Percentages:"
[1] "High global sales: 100 %"
[1] "High NA sales: 25 %"
[1] "High JP sales: 0 %"
[1] "High EU sales: 0 %"
[1] "High Other sales: 25 %"
[1] "Games in franchise with high sales: 37.5 %"
[1] "Games in franchise: 37.5 %"
[1] "Percentage of high selling games ratings:"
[1] "E: 37.5 %"
[1] "EC: 0 %"
[1] "E10+: 0 %"
[1] "T: 25 %"
[1] "M: 37.5 %"
[1] "Platform Frequencies of High Sale Games:"
     PlatformPS2 PlatformPS3 PlatformWii PlatformX360
2495           1           4           1            2
[1] "Platform Frequencies"
     PlatformPS2 PlatformPS3 PlatformWii PlatformX360
2495           1           4           1            2
[1] "------------------------------------------"
[1] "Clus= 3"
[1] "Total number of games in cluster: 116"
[1] "Average Global Sales: 0.89868154158215"
[1] "Percentages:"
[1] "High global sales: 47.4137931034483 %"
[1] "High NA sales: 6.03448275862069 %"
[1] "High JP sales: 0 %"
[1] "High EU sales: 0 %"
[1] "High Other sales: 6.89655172413793 %"
[1] "Games in franchise with high sales: 31.0344827586207 %"
[1] "Games in franchise: 51.7241379310345 %"
[1] "Percentage of high selling games ratings:"
[1] "E: 34.4827586206897 %"
[1] "EC: 0 %"
[1] "E10+: 13.7931034482759 %"
[1] "T: 27.5862068965517 %"
[1] "M: 24.1379310344828 %"
[1] "Platform Frequencies of High Sale Games:"
     Platform3DS PlatformDS PlatformGBA PlatformGC PlatformPS2 PlatformPS3
2623           2          6           1          1           8          10
     PlatformPSP PlatformPSV PlatformWii PlatformX360 PlatformXB PlatformXOne
2623           2           1           8           12          3            1
[1] "Platform Frequencies"
     Platform3DS PlatformDS PlatformGBA PlatformGC PlatformPC PlatformPS2
2867           5         11           7          1          2          16
     PlatformPS3 PlatformPS4 PlatformPSP PlatformPSV PlatformWii PlatformWiiU
2867          24           1           4           1          11            3
     PlatformX360 PlatformXB PlatformXOne
2867           22          7            1
[1] "------------------------------------------"
[1] "Clus= 4"
[1] "Total number of games in cluster: 158"
[1] "Average Global Sales: 0.821221146686523"
[1] "Percentages:"
[1] "High global sales: 20.253164556962 %"
[1] "High NA sales: 1.26582278481013 %"
[1] "High JP sales: 0.632911392405063 %"
[1] "High EU sales: 1.89873417721519 %"
[1] "High Other sales: 4.43037974683544 %"
[1] "Games in franchise with high sales: 12.6582278481013 %"
[1] "Games in franchise: 50 %"
[1] "Percentage of high selling games ratings:"
[1] "E: 32.9113924050633 %"
[1] "EC: 0 %"
[1] "E10+: 17.0886075949367 %"
[1] "T: 32.2784810126582 %"
[1] "M: 17.7215189873418 %"
[1] "Platform Frequencies of High Sale Games:"
     PlatformDS PlatformGBA PlatformGC PlatformPS2 PlatformPS3 PlatformWii
2632          3           1          4           4           6           4
     PlatformX360 PlatformXB
2632            9          1
[1] "Platform Frequencies"
     Platform3DS PlatformDS PlatformGBA PlatformGC PlatformPC PlatformPS2
3333           1         17           8          8          7          16
     PlatformPS3 PlatformPSP PlatformPSV PlatformWii PlatformWiiU PlatformX360
3333          30           9           1          23            3           25
     PlatformXB PlatformXOne
3333          9            1
[1] "------------------------------------------"
[1] "Clus= 5"
[1] "Total number of games in cluster: 225"
[1] "Average Global Sales: 0.758745098039216"
[1] "Percentages:"
[1] "High global sales: 0 %"
[1] "High NA sales: 0 %"
[1] "High JP sales: 1.77777777777778 %"
[1] "High EU sales: 0.888888888888889 %"
[1] "High Other sales: 3.55555555555556 %"
[1] "Games in franchise with high sales: 0 %"
[1] "Games in franchise: 45.3333333333333 %"
[1] "Percentage of high selling games ratings:"
[1] "E: 38.6666666666667 %"
[1] "EC: 0 %"
[1] "E10+: 13.3333333333333 %"
[1] "T: 32.4444444444444 %"
[1] "M: 15.5555555555556 %"
[1] "Platform Frequencies of High Sale Games:"
data frame with 0 columns and 0 rows
[1] "Platform Frequencies"
     Platform3DS PlatformDS PlatformGBA PlatformGC PlatformPC PlatformPS2
3339           6         20          16         11         10          36
     PlatformPS3 PlatformPS4 PlatformPSP PlatformPSV PlatformWii PlatformWiiU
3339          33           4           9           2          20            1
     PlatformX360 PlatformXB PlatformXOne
3339           33         19            5
[1] "------------------------------------------"
[1] "Summary for: GenrePlatform"
[1] "*******************************************"
[1] "Clus= 1"
[1] "Total number of games in cluster: 4"
[1] "Average Global Sales: 0.994117647058824"
[1] "Percentages:"
[1] "High global sales: 100 %"
[1] "High NA sales: 0 %"
[1] "High JP sales: 0 %"
[1] "High EU sales: 0 %"
[1] "High Other sales: 0 %"
[1] "Games in franchise with high sales: 50 %"
[1] "Games in franchise: 50 %"
[1] "Percentage of high selling games ratings:"
[1] "E: 50 %"
[1] "EC: 0 %"
[1] "E10+: 0 %"
[1] "T: 25 %"
[1] "M: 25 %"
[1] "Platform Frequencies of High Sale Games:"
     PlatformDS PlatformPS3 PlatformX360
2442          2           1            1
[1] "Platform Frequencies"
     PlatformDS PlatformPS3 PlatformX360
2442          2           1            1
[1] "------------------------------------------"
[1] "Clus= 2"
[1] "Total number of games in cluster: 9"
[1] "Average Global Sales: 0.979084967320261"
[1] "Percentages:"
[1] "High global sales: 100 %"
[1] "High NA sales: 22.2222222222222 %"
[1] "High JP sales: 0 %"
[1] "High EU sales: 0 %"
[1] "High Other sales: 11.1111111111111 %"
[1] "Games in franchise with high sales: 22.2222222222222 %"
[1] "Games in franchise: 22.2222222222222 %"
[1] "Percentage of high selling games ratings:"
[1] "E: 22.2222222222222 %"
[1] "EC: 0 %"
[1] "E10+: 11.1111111111111 %"
[1] "T: 44.4444444444444 %"
[1] "M: 22.2222222222222 %"
[1] "Platform Frequencies of High Sale Games:"
     PlatformGC PlatformPS2 PlatformPS3 PlatformWii PlatformX360
2470          1           1           3           3            1
[1] "Platform Frequencies"
     PlatformGC PlatformPS2 PlatformPS3 PlatformWii PlatformX360
2470          1           1           3           3            1
[1] "------------------------------------------"
[1] "Clus= 3"
[1] "Total number of games in cluster: 16"
[1] "Average Global Sales: 0.9875"
[1] "Percentages:"
[1] "High global sales: 100 %"
[1] "High NA sales: 12.5 %"
[1] "High JP sales: 0 %"
[1] "High EU sales: 0 %"
[1] "High Other sales: 12.5 %"
[1] "Games in franchise with high sales: 37.5 %"
[1] "Games in franchise: 37.5 %"
[1] "Percentage of high selling games ratings:"
[1] "E: 43.75 %"
[1] "EC: 0 %"
[1] "E10+: 12.5 %"
[1] "T: 31.25 %"
[1] "M: 12.5 %"
[1] "Platform Frequencies of High Sale Games:"
     PlatformGC PlatformPS2 PlatformPS3 PlatformWii PlatformWiiU PlatformX360
2455          1           3           6           2            1            2
     PlatformXB
2455          1
[1] "Platform Frequencies"
     PlatformGC PlatformPS2 PlatformPS3 PlatformWii PlatformWiiU PlatformX360
2455          1           3           6           2            1            2
     PlatformXB
2455          1
[1] "------------------------------------------"
[1] "Clus= 4"
[1] "Total number of games in cluster: 91"
[1] "Average Global Sales: 0.910019392372334"
[1] "Percentages:"
[1] "High global sales: 54.9450549450549 %"
[1] "High NA sales: 4.3956043956044 %"
[1] "High JP sales: 0 %"
[1] "High EU sales: 2.1978021978022 %"
[1] "High Other sales: 5.49450549450549 %"
[1] "Games in franchise with high sales: 35.1648351648352 %"
[1] "Games in franchise: 49.4505494505495 %"
[1] "Percentage of high selling games ratings:"
[1] "E: 32.967032967033 %"
[1] "EC: 0 %"
[1] "E10+: 18.6813186813187 %"
[1] "T: 28.5714285714286 %"
[1] "M: 19.7802197802198 %"
[1] "Platform Frequencies of High Sale Games:"
     Platform3DS PlatformDS PlatformGBA PlatformGC PlatformPS2 PlatformPS3
2632           1          8           1          2           4           7
     PlatformPSP PlatformWii PlatformX360 PlatformXB PlatformXOne
2632           2           8           15          1            1
[1] "Platform Frequencies"
     Platform3DS PlatformDS PlatformGBA PlatformGC PlatformPC PlatformPS2
2776           3         11           2          2          3           9
     PlatformPS3 PlatformPS4 PlatformPSP PlatformWii PlatformWiiU PlatformX360
2776          17           1           4          17            1           17
     PlatformXB PlatformXOne
2776          3            1
[1] "------------------------------------------"
[1] "Clus= 5"
[1] "Total number of games in cluster: 86"
[1] "Average Global Sales: 0.912585499316006"
[1] "Percentages:"
[1] "High global sales: 61.6279069767442 %"
[1] "High NA sales: 6.97674418604651 %"
[1] "High JP sales: 0 %"
[1] "High EU sales: 0 %"
[1] "High Other sales: 5.81395348837209 %"
[1] "Games in franchise with high sales: 38.3720930232558 %"
[1] "Games in franchise: 50 %"
[1] "Percentage of high selling games ratings:"
[1] "E: 30.2325581395349 %"
[1] "EC: 0 %"
[1] "E10+: 10.4651162790698 %"
[1] "T: 30.2325581395349 %"
[1] "M: 29.0697674418605 %"
[1] "Platform Frequencies of High Sale Games:"
     Platform3DS PlatformDS PlatformGBA PlatformGC PlatformPS2 PlatformPS3
2630           1          3           2          3          11          13
     PlatformPSV PlatformWii PlatformX360 PlatformXB
2630           1           6            9          4
[1] "Platform Frequencies"
     Platform3DS PlatformDS PlatformGBA PlatformGC PlatformPC PlatformPS2
2775           2          9           5          3          1          12
     PlatformPS3 PlatformPSP PlatformPSV PlatformWii PlatformWiiU PlatformX360
2775          18           3           1           8            1           16
     PlatformXB
2775          7
[1] "------------------------------------------"
[1] "Summary for: GenrePuzzle"
[1] "*******************************************"
[1] "Clus= 1"
[1] "Total number of games in cluster: 18"
[1] "Average Global Sales: 0.988888888888889"
[1] "Percentages:"
[1] "High global sales: 100 %"
[1] "High NA sales: 5.55555555555556 %"
[1] "High JP sales: 0 %"
[1] "High EU sales: 0 %"
[1] "High Other sales: 16.6666666666667 %"
[1] "Games in franchise with high sales: 33.3333333333333 %"
[1] "Games in franchise: 33.3333333333333 %"
[1] "Percentage of high selling games ratings:"
[1] "E: 33.3333333333333 %"
[1] "EC: 0 %"
[1] "E10+: 11.1111111111111 %"
[1] "T: 33.3333333333333 %"
[1] "M: 22.2222222222222 %"
[1] "Platform Frequencies of High Sale Games:"
     PlatformDS PlatformGC PlatformPS2 PlatformPS3 PlatformWii PlatformWiiU
2451          2          1           2           7           2            1
     PlatformX360
2451            3
[1] "Platform Frequencies"
     PlatformDS PlatformGC PlatformPS2 PlatformPS3 PlatformWii PlatformWiiU
2451          2          1           2           7           2            1
     PlatformX360
2451            3
[1] "------------------------------------------"
[1] "Clus= 2"
[1] "Total number of games in cluster: 3"
[1] "Average Global Sales: 0.992156862745098"
[1] "Percentages:"
[1] "High global sales: 100 %"
[1] "High NA sales: 0 %"
[1] "High JP sales: 0 %"
[1] "High EU sales: 0 %"
[1] "High Other sales: 0 %"
[1] "Games in franchise with high sales: 33.3333333333333 %"
[1] "Games in franchise: 33.3333333333333 %"
[1] "Percentage of high selling games ratings:"
[1] "E: 66.6666666666667 %"
[1] "EC: 0 %"
[1] "E10+: 33.3333333333333 %"
[1] "T: 0 %"
[1] "M: 0 %"
[1] "Platform Frequencies of High Sale Games:"
     PlatformWii PlatformXB
2428           2          1
[1] "Platform Frequencies"
     PlatformWii PlatformXB
2428           2          1
[1] "------------------------------------------"
[1] "Clus= 3"
[1] "Total number of games in cluster: 207"
[1] "Average Global Sales: 0.906621199204319"
[1] "Percentages:"
[1] "High global sales: 53.6231884057971 %"
[1] "High NA sales: 6.28019323671498 %"
[1] "High JP sales: 0 %"
[1] "High EU sales: 0.966183574879227 %"
[1] "High Other sales: 5.31400966183575 %"
[1] "Games in franchise with high sales: 32.8502415458937 %"
[1] "Games in franchise: 50.2415458937198 %"
[1] "Percentage of high selling games ratings:"
[1] "E: 33.3333333333333 %"
[1] "EC: 0 %"
[1] "E10+: 14.0096618357488 %"
[1] "T: 30.9178743961353 %"
[1] "M: 21.7391304347826 %"
[1] "Platform Frequencies of High Sale Games:"
     Platform3DS PlatformDS PlatformGBA PlatformGC PlatformPS2 PlatformPS3
2632           2         11           3          6          17          23
     PlatformPSP PlatformPSV PlatformWii PlatformX360 PlatformXB PlatformXOne
2632           2           1          15           25          5            1
[1] "Platform Frequencies"
     Platform3DS PlatformDS PlatformGBA PlatformGC PlatformPC PlatformPS2
2815           5         23          10          7          4          25
     PlatformPS3 PlatformPS4 PlatformPSP PlatformPSV PlatformWii PlatformWiiU
2815          43           1           7           1          29            3
     PlatformX360 PlatformXB PlatformXOne
2815           37         11            1
[1] "------------------------------------------"
[1] "Summary for: GenreRacing"
[1] "*******************************************"
[1] "Clus= 1"
[1] "Total number of games in cluster: 6"
[1] "Average Global Sales: 0.988235294117647"
[1] "Percentages:"
[1] "High global sales: 100 %"
[1] "High NA sales: 0 %"
[1] "High JP sales: 0 %"
[1] "High EU sales: 0 %"
[1] "High Other sales: 16.6666666666667 %"
[1] "Games in franchise with high sales: 16.6666666666667 %"
[1] "Games in franchise: 16.6666666666667 %"
[1] "Percentage of high selling games ratings:"
[1] "E: 50 %"
[1] "EC: 0 %"
[1] "E10+: 16.6666666666667 %"
[1] "T: 33.3333333333333 %"
[1] "M: 0 %"
[1] "Platform Frequencies of High Sale Games:"
     PlatformDS PlatformGBA PlatformGC PlatformPS3 PlatformWii PlatformXB
2466          1           1          1           1           1          1
[1] "Platform Frequencies"
     PlatformDS PlatformGBA PlatformGC PlatformPS3 PlatformWii PlatformXB
2466          1           1          1           1           1          1
[1] "------------------------------------------"
[1] "Clus= 2"
[1] "Total number of games in cluster: 43"
[1] "Average Global Sales: 0.964158686730506"
[1] "Percentages:"
[1] "High global sales: 100 %"
[1] "High NA sales: 9.30232558139535 %"
[1] "High JP sales: 0 %"
[1] "High EU sales: 0 %"
[1] "High Other sales: 6.97674418604651 %"
[1] "Games in franchise with high sales: 46.5116279069767 %"
[1] "Games in franchise: 46.5116279069767 %"
[1] "Percentage of high selling games ratings:"
[1] "E: 27.906976744186 %"
[1] "EC: 0 %"
[1] "E10+: 11.6279069767442 %"
[1] "T: 32.5581395348837 %"
[1] "M: 27.906976744186 %"
[1] "Platform Frequencies of High Sale Games:"
     Platform3DS PlatformDS PlatformGBA PlatformGC PlatformPS2 PlatformPS3
2588           2          3           1          1           6          11
     PlatformPSP PlatformWii PlatformWiiU PlatformX360 PlatformXB
2588           1           9            1            6          2
[1] "Platform Frequencies"
     Platform3DS PlatformDS PlatformGBA PlatformGC PlatformPS2 PlatformPS3
2588           2          3           1          1           6          11
     PlatformPSP PlatformWii PlatformWiiU PlatformX360 PlatformXB
2588           1           9            1            6          2
[1] "------------------------------------------"
[1] "Clus= 3"
[1] "Total number of games in cluster: 22"
[1] "Average Global Sales: 0.959358288770053"
[1] "Percentages:"
[1] "High global sales: 100 %"
[1] "High NA sales: 22.7272727272727 %"
[1] "High JP sales: 0 %"
[1] "High EU sales: 4.54545454545455 %"
[1] "High Other sales: 9.09090909090909 %"
[1] "Games in franchise with high sales: 77.2727272727273 %"
[1] "Games in franchise: 77.2727272727273 %"
[1] "Percentage of high selling games ratings:"
[1] "E: 54.5454545454545 %"
[1] "EC: 0 %"
[1] "E10+: 9.09090909090909 %"
[1] "T: 18.1818181818182 %"
[1] "M: 18.1818181818182 %"
[1] "Platform Frequencies of High Sale Games:"
     PlatformDS PlatformGC PlatformPS2 PlatformPS3 PlatformWii PlatformX360
2557          3          1           4           7           2            5
[1] "Platform Frequencies"
     PlatformDS PlatformGC PlatformPS2 PlatformPS3 PlatformWii PlatformX360
2557          3          1           4           7           2            5
[1] "------------------------------------------"
[1] "Clus= 4"
[1] "Total number of games in cluster: 220"
[1] "Average Global Sales: 0.850053475935829"
[1] "Percentages:"
[1] "High global sales: 23.6363636363636 %"
[1] "High NA sales: 2.27272727272727 %"
[1] "High JP sales: 0.909090909090909 %"
[1] "High EU sales: 0.909090909090909 %"
[1] "High Other sales: 4.54545454545455 %"
[1] "Games in franchise with high sales: 14.0909090909091 %"
[1] "Games in franchise: 48.6363636363636 %"
[1] "Percentage of high selling games ratings:"
[1] "E: 34.5454545454545 %"
[1] "EC: 0 %"
[1] "E10+: 13.1818181818182 %"
[1] "T: 33.1818181818182 %"
[1] "M: 19.0909090909091 %"
[1] "Platform Frequencies of High Sale Games:"
     PlatformDS PlatformGBA PlatformGC PlatformPS2 PlatformPS3 PlatformPSP
2632          5           1          2           9           8           1
     PlatformPSV PlatformWii PlatformX360 PlatformXB PlatformXOne
2632           1           7           14          3            1
[1] "Platform Frequencies"
     Platform3DS PlatformDS PlatformGBA PlatformGC PlatformPC PlatformPS2
3064           4         22           8          8          8          28
     PlatformPS3 PlatformPS4 PlatformPSP PlatformPSV PlatformWii PlatformWiiU
3064          39           4           9           1          26            2
     PlatformX360 PlatformXB PlatformXOne
3064           39         18            4
[1] "------------------------------------------"
[1] "Clus= 5"
[1] "Total number of games in cluster: 88"
[1] "Average Global Sales: 0.836229946524064"
[1] "Percentages:"
[1] "High global sales: 10.2272727272727 %"
[1] "High NA sales: 0 %"
[1] "High JP sales: 0 %"
[1] "High EU sales: 1.13636363636364 %"
[1] "High Other sales: 4.54545454545455 %"
[1] "Games in franchise with high sales: 6.81818181818182 %"
[1] "Games in franchise: 45.4545454545455 %"
[1] "Percentage of high selling games ratings:"
[1] "E: 37.5 %"
[1] "EC: 0 %"
[1] "E10+: 15.9090909090909 %"
[1] "T: 26.1363636363636 %"
[1] "M: 20.4545454545455 %"
[1] "Platform Frequencies of High Sale Games:"
     PlatformDS PlatformGC PlatformPS3 PlatformX360
2630          1          2           3            3
[1] "Platform Frequencies"
     Platform3DS PlatformDS PlatformGBA PlatformGC PlatformPC PlatformPS2
3058           1         12           8          7          5          10
     PlatformPS3 PlatformPSP PlatformWii PlatformWiiU PlatformX360 PlatformXB
3058          13           5           5            3           13          5
     PlatformXOne
3058            1
[1] "------------------------------------------"
[1] "Summary for: GenreRole.Playing"
[1] "*******************************************"
[1] "Clus= 1"
[1] "Total number of games in cluster: 16"
[1] "Average Global Sales: 0.972058823529412"
[1] "Percentages:"
[1] "High global sales: 100 %"
[1] "High NA sales: 6.25 %"
[1] "High JP sales: 0 %"
[1] "High EU sales: 0 %"
[1] "High Other sales: 6.25 %"
[1] "Games in franchise with high sales: 50 %"
[1] "Games in franchise: 50 %"
[1] "Percentage of high selling games ratings:"
[1] "E: 62.5 %"
[1] "EC: 0 %"
[1] "E10+: 0 %"
[1] "T: 18.75 %"
[1] "M: 18.75 %"
[1] "Platform Frequencies of High Sale Games:"
     PlatformDS PlatformGC PlatformPS2 PlatformPS3 PlatformWii PlatformX360
2558          3          1           2           3           2            2
     PlatformXB
2558          3
[1] "Platform Frequencies"
     PlatformDS PlatformGC PlatformPS2 PlatformPS3 PlatformWii PlatformX360
2558          3          1           2           3           2            2
     PlatformXB
2558          3
[1] "------------------------------------------"
[1] "Clus= 2"
[1] "Total number of games in cluster: 48"
[1] "Average Global Sales: 0.966176470588235"
[1] "Percentages:"
[1] "High global sales: 100 %"
[1] "High NA sales: 16.6666666666667 %"
[1] "High JP sales: 0 %"
[1] "High EU sales: 0 %"
[1] "High Other sales: 8.33333333333333 %"
[1] "Games in franchise with high sales: 56.25 %"
[1] "Games in franchise: 56.25 %"
[1] "Percentage of high selling games ratings:"
[1] "E: 33.3333333333333 %"
[1] "EC: 0 %"
[1] "E10+: 12.5 %"
[1] "T: 33.3333333333333 %"
[1] "M: 20.8333333333333 %"
[1] "Platform Frequencies of High Sale Games:"
     Platform3DS PlatformDS PlatformGBA PlatformGC PlatformPS2 PlatformPS3
2566           1          2           2          1          10          15
     PlatformPSP PlatformWii PlatformX360
2566           1          10            6
[1] "Platform Frequencies"
     Platform3DS PlatformDS PlatformGBA PlatformGC PlatformPS2 PlatformPS3
2566           1          2           2          1          10          15
     PlatformPSP PlatformWii PlatformX360
2566           1          10            6
[1] "------------------------------------------"
[1] "Clus= 3"
[1] "Total number of games in cluster: 7"
[1] "Average Global Sales: 0.983193277310924"
[1] "Percentages:"
[1] "High global sales: 100 %"
[1] "High NA sales: 0 %"
[1] "High JP sales: 0 %"
[1] "High EU sales: 0 %"
[1] "High Other sales: 14.2857142857143 %"
[1] "Games in franchise with high sales: 28.5714285714286 %"
[1] "Games in franchise: 28.5714285714286 %"
[1] "Percentage of high selling games ratings:"
[1] "E: 28.5714285714286 %"
[1] "EC: 0 %"
[1] "E10+: 0 %"
[1] "T: 28.5714285714286 %"
[1] "M: 42.8571428571429 %"
[1] "Platform Frequencies of High Sale Games:"
     PlatformDS PlatformPS2 PlatformPS3 PlatformWiiU PlatformX360 PlatformXB
2479          1           1           2            1            1          1
[1] "Platform Frequencies"
     PlatformDS PlatformPS2 PlatformPS3 PlatformWiiU PlatformX360 PlatformXB
2479          1           1           2            1            1          1
[1] "------------------------------------------"
[1] "Clus= 4"
[1] "Total number of games in cluster: 19"
[1] "Average Global Sales: 0.85077399380805"
[1] "Percentages:"
[1] "High global sales: 21.0526315789474 %"
[1] "High NA sales: 5.26315789473684 %"
[1] "High JP sales: 0 %"
[1] "High EU sales: 0 %"
[1] "High Other sales: 0 %"
[1] "Games in franchise with high sales: 0 %"
[1] "Games in franchise: 36.8421052631579 %"
[1] "Percentage of high selling games ratings:"
[1] "E: 42.1052631578947 %"
[1] "EC: 0 %"
[1] "E10+: 5.26315789473684 %"
[1] "T: 36.8421052631579 %"
[1] "M: 15.7894736842105 %"
[1] "Platform Frequencies of High Sale Games:"
     PlatformDS PlatformPS2 PlatformPS3 PlatformX360
2553          1           1           1            1
[1] "Platform Frequencies"
     Platform3DS PlatformDS PlatformGBA PlatformPS2 PlatformPS3 PlatformPSP
3000           1          1           2           2           6           1
     PlatformWii PlatformX360 PlatformXB
3000           1            2          3
[1] "------------------------------------------"
[1] "Clus= 5"
[1] "Total number of games in cluster: 276"
[1] "Average Global Sales: 0.84846547314578"
[1] "Percentages:"
[1] "High global sales: 20.6521739130435 %"
[1] "High NA sales: 1.44927536231884 %"
[1] "High JP sales: 0.72463768115942 %"
[1] "High EU sales: 1.44927536231884 %"
[1] "High Other sales: 5.07246376811594 %"
[1] "Games in franchise with high sales: 13.768115942029 %"
[1] "Games in franchise: 48.9130434782609 %"
[1] "Percentage of high selling games ratings:"
[1] "E: 35.1449275362319 %"
[1] "EC: 0 %"
[1] "E10+: 15.2173913043478 %"
[1] "T: 29.7101449275362 %"
[1] "M: 19.9275362318841 %"
[1] "Platform Frequencies of High Sale Games:"
     Platform3DS PlatformDS PlatformGBA PlatformGC PlatformPS2 PlatformPS3
2632           1          6           1          5           5           9
     PlatformPSP PlatformPSV PlatformWii PlatformX360 PlatformXB PlatformXOne
2632           1           1           7           18          2            1
[1] "Platform Frequencies"
     Platform3DS PlatformDS PlatformGBA PlatformGC PlatformPC PlatformPS2
3044           5         34          12         15         11          31
     PlatformPS3 PlatformPS4 PlatformPSP PlatformPSV PlatformWii PlatformWiiU
3044          43           4          12           1          29            4
     PlatformX360 PlatformXB PlatformXOne
3044           51         19            5
[1] "------------------------------------------"
[1] "Summary for: GenreShooter"
[1] "*******************************************"
[1] "Clus= 1"
[1] "Total number of games in cluster: 122"
[1] "Average Global Sales: 0.951012536162006"
[1] "Percentages:"
[1] "High global sales: 95.9016393442623 %"
[1] "High NA sales: 11.4754098360656 %"
[1] "High JP sales: 0 %"
[1] "High EU sales: 1.63934426229508 %"
[1] "High Other sales: 7.37704918032787 %"
[1] "Games in franchise with high sales: 54.0983606557377 %"
[1] "Games in franchise: 54.0983606557377 %"
[1] "Percentage of high selling games ratings:"
[1] "E: 34.4262295081967 %"
[1] "EC: 0 %"
[1] "E10+: 11.4754098360656 %"
[1] "T: 33.6065573770492 %"
[1] "M: 20.4918032786885 %"
[1] "Platform Frequencies of High Sale Games:"
     Platform3DS PlatformDS PlatformGBA PlatformGC PlatformPS2 PlatformPS3
2632           2         11           2          6          18          27
     PlatformPSP PlatformPSV PlatformWii PlatformWiiU PlatformX360 PlatformXB
2632           1           1          19            1           23          5
     PlatformXOne
2632            1
[1] "Platform Frequencies"
     Platform3DS PlatformDS PlatformGBA PlatformGC PlatformPS2 PlatformPS3
2666           2         12           3          6          19          27
     PlatformPSP PlatformPSV PlatformWii PlatformWiiU PlatformX360 PlatformXB
2666           1           1          20            1           24          5
     PlatformXOne
2666            1
[1] "------------------------------------------"
[1] "Clus= 2"
[1] "Total number of games in cluster: 348"
[1] "Average Global Sales: 0.805882352941176"
[1] "Percentages:"
[1] "High global sales: 4.31034482758621 %"
[1] "High NA sales: 0 %"
[1] "High JP sales: 1.14942528735632 %"
[1] "High EU sales: 0.862068965517241 %"
[1] "High Other sales: 4.02298850574713 %"
[1] "Games in franchise with high sales: 2.58620689655172 %"
[1] "Games in franchise: 45.9770114942529 %"
[1] "Percentage of high selling games ratings:"
[1] "E: 35.9195402298851 %"
[1] "EC: 0 %"
[1] "E10+: 13.5057471264368 %"
[1] "T: 31.3218390804598 %"
[1] "M: 19.2528735632184 %"
[1] "Platform Frequencies of High Sale Games:"
     PlatformDS PlatformGBA PlatformGC PlatformPS2 PlatformPS3 PlatformPSP
2630          2           1          1           1           3           1
     PlatformX360 PlatformXB
2630            5          1
[1] "Platform Frequencies"
     Platform3DS PlatformDS PlatformGBA PlatformGC PlatformPC PlatformPS2
3218           7         34          20         15         19          46
     PlatformPS3 PlatformPS4 PlatformPSP PlatformPSV PlatformWii PlatformWiiU
3218          58           4          20           2          32            6
     PlatformX360 PlatformXB PlatformXOne
3218           52         28            5
[1] "------------------------------------------"
[1] "Summary for: GenreSimulation"
[1] "*******************************************"
[1] "Clus= 1"
[1] "Total number of games in cluster: 44"
[1] "Average Global Sales: 0.977540106951872"
[1] "Percentages:"
[1] "High global sales: 100 %"
[1] "High NA sales: 11.3636363636364 %"
[1] "High JP sales: 0 %"
[1] "High EU sales: 0 %"
[1] "High Other sales: 11.3636363636364 %"
[1] "Games in franchise with high sales: 45.4545454545455 %"
[1] "Games in franchise: 45.4545454545455 %"
[1] "Percentage of high selling games ratings:"
[1] "E: 36.3636363636364 %"
[1] "EC: 0 %"
[1] "E10+: 13.6363636363636 %"
[1] "T: 27.2727272727273 %"
[1] "M: 22.7272727272727 %"
[1] "Platform Frequencies of High Sale Games:"
     PlatformDS PlatformGBA PlatformGC PlatformPS2 PlatformPS3 PlatformPSP
2551          3           1          2           9          13           1
     PlatformWii PlatformWiiU PlatformX360 PlatformXB
2551           6            1            7          1
[1] "Platform Frequencies"
     PlatformDS PlatformGBA PlatformGC PlatformPS2 PlatformPS3 PlatformPSP
2551          3           1          2           9          13           1
     PlatformWii PlatformWiiU PlatformX360 PlatformXB
2551           6            1            7          1
[1] "------------------------------------------"
[1] "Clus= 2"
[1] "Total number of games in cluster: 210"
[1] "Average Global Sales: 0.858991596638655"
[1] "Percentages:"
[1] "High global sales: 30.4761904761905 %"
[1] "High NA sales: 3.80952380952381 %"
[1] "High JP sales: 0.952380952380952 %"
[1] "High EU sales: 0.476190476190476 %"
[1] "High Other sales: 5.23809523809524 %"
[1] "Games in franchise with high sales: 18.0952380952381 %"
[1] "Games in franchise: 49.5238095238095 %"
[1] "Percentage of high selling games ratings:"
[1] "E: 38.0952380952381 %"
[1] "EC: 0 %"
[1] "E10+: 12.3809523809524 %"
[1] "T: 32.8571428571429 %"
[1] "M: 16.6666666666667 %"
[1] "Platform Frequencies of High Sale Games:"
     Platform3DS PlatformDS PlatformGBA PlatformGC PlatformPS2 PlatformPS3
2630           2          8           2          4           8          14
     PlatformPSP PlatformWii PlatformX360 PlatformXB PlatformXOne
2630           1           7           14          3            1
[1] "Platform Frequencies"
     Platform3DS PlatformDS PlatformGBA PlatformGC PlatformPC PlatformPS2
3067           5         24          10         12         10          21
     PlatformPS3 PlatformPS4 PlatformPSP PlatformWii PlatformWiiU PlatformX360
3067          40           2          10          20            2           37
     PlatformXB PlatformXOne
3067         13            4
[1] "------------------------------------------"
[1] "Clus= 3"
[1] "Total number of games in cluster: 12"
[1] "Average Global Sales: 0.945098039215686"
[1] "Percentages:"
[1] "High global sales: 100 %"
[1] "High NA sales: 8.33333333333333 %"
[1] "High JP sales: 0 %"
[1] "High EU sales: 8.33333333333333 %"
[1] "High Other sales: 0 %"
[1] "Games in franchise with high sales: 75 %"
[1] "Games in franchise: 75 %"
[1] "Percentage of high selling games ratings:"
[1] "E: 16.6666666666667 %"
[1] "EC: 0 %"
[1] "E10+: 16.6666666666667 %"
[1] "T: 33.3333333333333 %"
[1] "M: 33.3333333333333 %"
[1] "Platform Frequencies of High Sale Games:"
     PlatformDS PlatformGC PlatformPS2 PlatformPS3 PlatformWii PlatformX360
2622          1          1           1           1           6            1
     PlatformXB
2622          1
[1] "Platform Frequencies"
     PlatformDS PlatformGC PlatformPS2 PlatformPS3 PlatformWii PlatformX360
2622          1          1           1           1           6            1
     PlatformXB
2622          1
[1] "------------------------------------------"
[1] "Clus= 4"
[1] "Total number of games in cluster: 114"
[1] "Average Global Sales: 0.834365325077399"
[1] "Percentages:"
[1] "High global sales: 10.5263157894737 %"
[1] "High NA sales: 0 %"
[1] "High JP sales: 0 %"
[1] "High EU sales: 1.75438596491228 %"
[1] "High Other sales: 3.50877192982456 %"
[1] "Games in franchise with high sales: 7.01754385964912 %"
[1] "Games in franchise: 45.6140350877193 %"
[1] "Percentage of high selling games ratings:"
[1] "E: 33.3333333333333 %"
[1] "EC: 0 %"
[1] "E10+: 15.7894736842105 %"
[1] "T: 27.1929824561404 %"
[1] "M: 23.6842105263158 %"
[1] "Platform Frequencies of High Sale Games:"
     PlatformDS PlatformPS2 PlatformPS3 PlatformPSV PlatformX360 PlatformXB
2632          1           1           2           1            6          1
[1] "Platform Frequencies"
     Platform3DS PlatformDS PlatformGBA PlatformGC PlatformPC PlatformPS2
3062           2         13           7          3          3          17
     PlatformPS3 PlatformPS4 PlatformPSP PlatformPSV PlatformWii PlatformWiiU
3062          18           2           4           1          11            3
     PlatformX360 PlatformXB PlatformXOne
3062           18         11            1
[1] "------------------------------------------"
[1] "Summary for: GenreSports"
[1] "*******************************************"
[1] "Clus= 1"
[1] "Total number of games in cluster: 63"
[1] "Average Global Sales: 0.922875816993464"
[1] "Percentages:"
[1] "High global sales: 71.4285714285714 %"
[1] "High NA sales: 12.6984126984127 %"
[1] "High JP sales: 0 %"
[1] "High EU sales: 0 %"
[1] "High Other sales: 6.34920634920635 %"
[1] "Games in franchise with high sales: 39.6825396825397 %"
[1] "Games in franchise: 47.6190476190476 %"
[1] "Percentage of high selling games ratings:"
[1] "E: 36.5079365079365 %"
[1] "EC: 0 %"
[1] "E10+: 12.6984126984127 %"
[1] "T: 30.1587301587302 %"
[1] "M: 20.6349206349206 %"
[1] "Platform Frequencies of High Sale Games:"
     PlatformDS PlatformGC PlatformPS2 PlatformPS3 PlatformPSP PlatformWii
2630          6          2           7          13           1           6
     PlatformX360 PlatformXB
2630            9          1
[1] "Platform Frequencies"
     Platform3DS PlatformDS PlatformGBA PlatformGC PlatformPS2 PlatformPS3
2920           1          9           1          2           9          16
     PlatformPSP PlatformWii PlatformX360 PlatformXB
2920           2           7           11          5
[1] "------------------------------------------"
[1] "Clus= 2"
[1] "Total number of games in cluster: 60"
[1] "Average Global Sales: 0.957647058823529"
[1] "Percentages:"
[1] "High global sales: 98.3333333333333 %"
[1] "High NA sales: 8.33333333333333 %"
[1] "High JP sales: 0 %"
[1] "High EU sales: 0 %"
[1] "High Other sales: 6.66666666666667 %"
[1] "Games in franchise with high sales: 51.6666666666667 %"
[1] "Games in franchise: 51.6666666666667 %"
[1] "Percentage of high selling games ratings:"
[1] "E: 28.3333333333333 %"
[1] "EC: 0 %"
[1] "E10+: 8.33333333333333 %"
[1] "T: 35 %"
[1] "M: 28.3333333333333 %"
[1] "Platform Frequencies of High Sale Games:"
     Platform3DS PlatformDS PlatformGBA PlatformGC PlatformPS2 PlatformPS3
2632           1          3           3          2           9          13
     PlatformPSP PlatformPSV PlatformWii PlatformWiiU PlatformX360 PlatformXB
2632           1           1          10            1           13          2
[1] "Platform Frequencies"
     Platform3DS PlatformDS PlatformGBA PlatformGC PlatformPS2 PlatformPS3
2639           1          3           3          2           9          13
     PlatformPSP PlatformPSV PlatformWii PlatformWiiU PlatformX360 PlatformXB
2639           1           1          11            1           13          2
[1] "------------------------------------------"
[1] "Clus= 3"
[1] "Total number of games in cluster: 430"
[1] "Average Global Sales: 0.760246238030096"
[1] "Percentages:"
[1] "High global sales: 6.51162790697674 %"
[1] "High NA sales: 0.232558139534884 %"
[1] "High JP sales: 1.16279069767442 %"
[1] "High EU sales: 0.930232558139535 %"
[1] "High Other sales: 4.18604651162791 %"
[1] "Games in franchise with high sales: 4.41860465116279 %"
[1] "Games in franchise: 49.0697674418605 %"
[1] "Percentage of high selling games ratings:"
[1] "E: 37.906976744186 %"
[1] "EC: 0 %"
[1] "E10+: 16.5116279069767 %"
[1] "T: 29.5348837209302 %"
[1] "M: 16.046511627907 %"
[1] "Platform Frequencies of High Sale Games:"
     Platform3DS PlatformDS PlatformGC PlatformPS2 PlatformPS3 PlatformWii
2628           1          4          3           3           4           3
     PlatformX360 PlatformXB PlatformXOne
2628            6          3            1
[1] "Platform Frequencies"
     Platform3DS PlatformDS PlatformGBA PlatformGC PlatformPC PlatformPS2
3588          10         41          24         21         20          67
     PlatformPS3 PlatformPS4 PlatformPSP PlatformPSV PlatformWii PlatformWiiU
3588          73           4          21           3          45            7
     PlatformX360 PlatformXB PlatformXOne
3588           60         28            6
[1] "------------------------------------------"
[1] "Clus= 4"
[1] "Total number of games in cluster: 144"
[1] "Average Global Sales: 0.750571895424837"
[1] "Percentages:"
[1] "High global sales: 0 %"
[1] "High NA sales: 0 %"
[1] "High JP sales: 0 %"
[1] "High EU sales: 0.694444444444444 %"
[1] "High Other sales: 1.38888888888889 %"
[1] "Games in franchise with high sales: 0 %"
[1] "Games in franchise: 46.5277777777778 %"
[1] "Percentage of high selling games ratings:"
[1] "E: 36.8055555555556 %"
[1] "EC: 0 %"
[1] "E10+: 14.5833333333333 %"
[1] "T: 30.5555555555556 %"
[1] "M: 18.0555555555556 %"
[1] "Platform Frequencies of High Sale Games:"
data frame with 0 columns and 0 rows
[1] "Platform Frequencies"
     Platform3DS PlatformDS PlatformGBA PlatformGC PlatformPC PlatformPS2
3590           3         13          11          3          4          21
     PlatformPS3 PlatformPS4 PlatformPSP PlatformPSV PlatformWii PlatformWiiU
3590          20           3           5           2          17            2
     PlatformX360 PlatformXB PlatformXOne
3590           24         14            2
[1] "------------------------------------------"
[1] "Summary for: GenreStrategy"
[1] "*******************************************"
[1] "Clus= 1"
[1] "Total number of games in cluster: 6"
[1] "Average Global Sales: 0.994117647058824"
[1] "Percentages:"
[1] "High global sales: 100 %"
[1] "High NA sales: 0 %"
[1] "High JP sales: 0 %"
[1] "High EU sales: 0 %"
[1] "High Other sales: 0 %"
[1] "Games in franchise with high sales: 16.6666666666667 %"
[1] "Games in franchise: 16.6666666666667 %"
[1] "Percentage of high selling games ratings:"
[1] "E: 33.3333333333333 %"
[1] "EC: 0 %"
[1] "E10+: 33.3333333333333 %"
[1] "T: 16.6666666666667 %"
[1] "M: 16.6666666666667 %"
[1] "Platform Frequencies of High Sale Games:"
     PlatformDS PlatformPS3 PlatformWii
2433          1           2           3
[1] "Platform Frequencies"
     PlatformDS PlatformPS3 PlatformWii
2433          1           2           3
[1] "------------------------------------------"
[1] "Clus= 2"
[1] "Total number of games in cluster: 11"
[1] "Average Global Sales: 0.988235294117647"
[1] "Percentages:"
[1] "High global sales: 100 %"
[1] "High NA sales: 18.1818181818182 %"
[1] "High JP sales: 0 %"
[1] "High EU sales: 0 %"
[1] "High Other sales: 9.09090909090909 %"
[1] "Games in franchise with high sales: 54.5454545454545 %"
[1] "Games in franchise: 54.5454545454545 %"
[1] "Percentage of high selling games ratings:"
[1] "E: 54.5454545454545 %"
[1] "EC: 0 %"
[1] "E10+: 9.09090909090909 %"
[1] "T: 36.3636363636364 %"
[1] "M: 0 %"
[1] "Platform Frequencies of High Sale Games:"
     PlatformDS PlatformGC PlatformPS2 PlatformPS3 PlatformWii PlatformX360
2453          1          1           2           2           1            3
     PlatformXB
2453          1
[1] "Platform Frequencies"
     PlatformDS PlatformGC PlatformPS2 PlatformPS3 PlatformWii PlatformX360
2453          1          1           2           2           1            3
     PlatformXB
2453          1
[1] "------------------------------------------"
[1] "Clus= 3"
[1] "Total number of games in cluster: 165"
[1] "Average Global Sales: 0.908449197860963"
[1] "Percentages:"
[1] "High global sales: 53.3333333333333 %"
[1] "High NA sales: 5.45454545454545 %"
[1] "High JP sales: 0 %"
[1] "High EU sales: 1.21212121212121 %"
[1] "High Other sales: 7.87878787878788 %"
[1] "Games in franchise with high sales: 30.3030303030303 %"
[1] "Games in franchise: 46.0606060606061 %"
[1] "Percentage of high selling games ratings:"
[1] "E: 29.6969696969697 %"
[1] "EC: 0 %"
[1] "E10+: 13.9393939393939 %"
[1] "T: 31.5151515151515 %"
[1] "M: 24.8484848484848 %"
[1] "Platform Frequencies of High Sale Games:"
     Platform3DS PlatformDS PlatformGC PlatformPS2 PlatformPS3 PlatformPSP
2632           2          8          2          16          21           2
     PlatformPSV PlatformWii PlatformWiiU PlatformX360 PlatformXB
2632           1          11            1           20          4
[1] "Platform Frequencies"
     Platform3DS PlatformDS PlatformGBA PlatformGC PlatformPC PlatformPS2
2804           5         16           3          2          3          22
     PlatformPS3 PlatformPS4 PlatformPSP PlatformPSV PlatformWii PlatformWiiU
2804          38           1           6           1          24            3
     PlatformX360 PlatformXB
2804           31         10
[1] "------------------------------------------"
[1] "Clus= 4"
[1] "Total number of games in cluster: 37"
[1] "Average Global Sales: 0.923370429252782"
[1] "Percentages:"
[1] "High global sales: 72.972972972973 %"
[1] "High NA sales: 8.10810810810811 %"
[1] "High JP sales: 0 %"
[1] "High EU sales: 0 %"
[1] "High Other sales: 0 %"
[1] "Games in franchise with high sales: 48.6486486486487 %"
[1] "Games in franchise: 59.4594594594595 %"
[1] "Percentage of high selling games ratings:"
[1] "E: 43.2432432432432 %"
[1] "EC: 0 %"
[1] "E10+: 10.8108108108108 %"
[1] "T: 27.027027027027 %"
[1] "M: 18.9189189189189 %"
[1] "Platform Frequencies of High Sale Games:"
     PlatformDS PlatformGBA PlatformGC PlatformPS2 PlatformPS3 PlatformWii
2628          3           3          4           1           5           4
     PlatformX360 PlatformXB PlatformXOne
2628            5          1            1
[1] "Platform Frequencies"
     PlatformDS PlatformGBA PlatformGC PlatformPC PlatformPS2 PlatformPS3
2776          5           5          4          1           2           7
     PlatformPSP PlatformWii PlatformX360 PlatformXB PlatformXOne
2776           1           4            6          1            1
[1] "------------------------------------------"

Neural Networks¶

In [ ]:
# load game data to be used in NNs
games_for_nn <- cbind(select(games_keep_outliers, contains("inFranchise")),
                      select(games_keep_outliers, matches("^Genre.*")),
                      select(games_keep_outliers, contains("GlobalSales")))

# load and prepare NN regression data
nn_data <- NN_regression_data(games_for_nn)

# Getting the lables from the train and test set
nn_train_data <- NN_features_labels(nn_data$train)
nn_test_data <- NN_features_labels(nn_data$test)

# Splitting the data
split_nn_data <- NN_value_split_data(games_for_nn)
In [ ]:
# Training neural network
sales_model <- NN_train_network(as.data.frame(split_nn_data$low_train$features), split_nn_data$low_train$labels)
Model: "sequential"
________________________________________________________________________________
 Layer (type)                       Output Shape                    Param #     
================================================================================
 dense_4 (Dense)                    (None, 64)                      896         
 dropout_2 (Dropout)                (None, 64)                      0           
 dense_3 (Dense)                    (None, 128)                     8320        
 dropout_1 (Dropout)                (None, 128)                     0           
 dense_2 (Dense)                    (None, 128)                     16512       
 dropout (Dropout)                  (None, 128)                     0           
 dense_1 (Dense)                    (None, 64)                      8256        
 dense (Dense)                      (None, 1)                       65          
================================================================================
Total params: 34,049
Trainable params: 34,049
Non-trainable params: 0
________________________________________________________________________________
In [ ]:
# Plotting the history of the model
plot(sales_model$history)

# Making predictions of new data with the model
predictions <- predict(sales_model$sales_model, as.matrix(split_nn_data$low_test$features))
In [ ]:
# Plotting predictions
ggplot(data.frame(pred = as.numeric(predictions), GlobalSales = split_nn_data$low_test$labels$GlobalSales)) +
  geom_point(aes(x = pred, y = GlobalSales)) +
  geom_abline(intercept = 0, slope = 1, color = "blue")

Random Forests¶

In [ ]:
# Training a random forests algorithm on sales and the train set
print("Random Forests: Game Info Vs GlobalSales")
dt_game_data <- DT_data(games_keep_outliers)
output.forest <- randomForest(GlobalSales~., data = dt_game_data$train)
print(output.forest)
print(importance(output.forest), 2)
 
# Training a radnom forests algorithm on sales with a logarithmic transform
print("Random Forests: Game Info Vs Log(GlobalSales)")
dt_log_game_data <- DT_log_data(games_keep_outliers)
output.forest_log <- randomForest(log_sales~., data = dt_log_game_data$train)
print(output.forest_log)
print(importance(output.forest_log), 2)
[1] "Decision Tree: Game Info Vs GlobalSales"

Call:
 randomForest(formula = GlobalSales ~ ., data = dt_game_data$train) 
               Type of random forest: regression
                     Number of trees: 500
No. of variables tried at each split: 18

          Mean of squared residuals: 1.271054
                    % Var explained: 1.2
                                  IncNodePurity
Rating                                    511.0
YearofRelease                             127.7
NorthernAmerica_ageMedian                 130.2
NorthernAmerica_femaleRatioMedian         169.6
Japan_ageMedian                           131.3
Japan_femaleRatioMedian                   121.9
Europe_ageMedian                          130.4
Europe_femaleRatioMedian                  194.0
Other_ageMedian                           123.8
Other_femaleRatioMedian                   233.6
GenreAction                               156.9
GenreAdventure                             38.5
GenreFighting                              63.6
GenreMisc                                  89.2
GenrePlatform                             101.9
GenrePuzzle                                16.4
GenreRacing                                89.6
GenreRole.Playing                         123.7
GenreShooter                              194.9
GenreSimulation                            65.4
GenreSports                                81.3
GenreStrategy                              16.8
Platform2600                                0.0
Platform3DO                                 0.0
Platform3DS                                35.1
PlatformDC                                  1.2
PlatformDS                                 39.1
PlatformGB                                  0.0
PlatformGBA                                19.8
PlatformGC                                 23.3
PlatformGEN                                 0.0
PlatformGG                                  0.0
PlatformN64                                 0.0
PlatformNES                                 0.0
PlatformNG                                  0.0
PlatformPC                                 57.5
PlatformPCFX                                0.0
PlatformPS                                 15.7
PlatformPS2                                82.2
PlatformPS3                                83.8
PlatformPS4                                61.9
PlatformPSP                                25.5
PlatformPSV                                 6.3
PlatformSAT                                 0.0
PlatformSCD                                 0.0
PlatformSNES                                0.0
PlatformTG16                                0.0
PlatformWii                                70.1
PlatformWiiU                               10.4
PlatformWS                                  0.0
PlatformX360                              138.0
PlatformXB                                 26.4
PlatformXOne                               16.8
inFranchise                               351.2
[1] "Decision Tree: Game Info Vs Log(GlobalSales)"

Call:
 randomForest(formula = log_sales ~ ., data = dt_log_game_data$train) 
               Type of random forest: regression
                     Number of trees: 500
No. of variables tried at each split: 20

          Mean of squared residuals: 0.1413404
                    % Var explained: 63.18
                                  IncNodePurity
Name                                       45.0
Publisher                                  37.5
CriticCount                               134.1
UserCount                                 182.3
Developer                                  41.8
Rating                                     17.2
ReleaseDate                                55.5
YearofRelease                              14.4
CriticScore                               132.7
UserScore                                  19.0
NorthernAmerica_ageMedian                  14.4
NorthernAmerica_femaleRatioMedian          18.9
Japan_ageMedian                            13.6
Japan_femaleRatioMedian                    14.1
Europe_ageMedian                           13.8
Europe_femaleRatioMedian                   15.0
Other_ageMedian                            13.6
Other_femaleRatioMedian                    13.4
GenreAction                                 4.7
GenreAdventure                              2.5
GenreFighting                               2.3
GenreMisc                                   7.4
GenrePlatform                               2.6
GenrePuzzle                                 2.5
GenreRacing                                 3.4
GenreRole.Playing                           4.0
GenreShooter                                6.1
GenreSimulation                             5.2
GenreSports                                 4.7
GenreStrategy                               9.2
Platform2600                                0.0
Platform3DO                                 0.0
Platform3DS                                 1.2
PlatformDC                                  0.0
PlatformDS                                  4.7
PlatformGB                                  0.0
PlatformGBA                                 0.0
PlatformGC                                  0.0
PlatformGEN                                 0.0
PlatformGG                                  0.0
PlatformN64                                 0.0
PlatformNES                                 0.0
PlatformNG                                  0.0
PlatformPC                                154.8
PlatformPCFX                                0.0
PlatformPS                                  0.0
PlatformPS2                                 5.6
PlatformPS3                                 4.4
PlatformPS4                                 1.4
PlatformPSP                                 0.0
PlatformPSV                                 0.0
PlatformSAT                                 0.0
PlatformSCD                                 0.0
PlatformSNES                                0.0
PlatformTG16                                0.0
PlatformWii                                 5.4
PlatformWiiU                                2.0
PlatformWS                                  0.0
PlatformX360                                4.0
PlatformXB                                  0.0
PlatformXOne                                1.1
inFranchise                                55.5
In [ ]:
sapply(dt_log_numeric$train, class)
Name
'character'
Publisher
'character'
CriticCount
'integer'
UserCount
'integer'
Developer
'character'
Rating
'character'
ReleaseDate
'character'
YearofRelease
'numeric'
CriticScore
'numeric'
UserScore
'integer'
NorthernAmerica_ageMedian
'numeric'
NorthernAmerica_femaleRatioMedian
'numeric'
Japan_ageMedian
'numeric'
Japan_femaleRatioMedian
'numeric'
Europe_ageMedian
'numeric'
Europe_femaleRatioMedian
'numeric'
Other_ageMedian
'numeric'
Other_femaleRatioMedian
'numeric'
GenreAction
'numeric'
GenreAdventure
'numeric'
GenreFighting
'numeric'
GenreMisc
'numeric'
GenrePlatform
'numeric'
GenrePuzzle
'numeric'
GenreRacing
'numeric'
GenreRole.Playing
'numeric'
GenreShooter
'numeric'
GenreSimulation
'numeric'
GenreSports
'numeric'
GenreStrategy
'numeric'
Platform2600
'numeric'
Platform3DO
'numeric'
Platform3DS
'numeric'
PlatformDC
'numeric'
PlatformDS
'numeric'
PlatformGB
'numeric'
PlatformGBA
'numeric'
PlatformGC
'numeric'
PlatformGEN
'numeric'
PlatformGG
'numeric'
PlatformN64
'numeric'
PlatformNES
'numeric'
PlatformNG
'numeric'
PlatformPC
'numeric'
PlatformPCFX
'numeric'
PlatformPS
'numeric'
PlatformPS2
'numeric'
PlatformPS3
'numeric'
PlatformPS4
'numeric'
PlatformPSP
'numeric'
PlatformPSV
'numeric'
PlatformSAT
'numeric'
PlatformSCD
'numeric'
PlatformSNES
'numeric'
PlatformTG16
'numeric'
PlatformWii
'numeric'
PlatformWiiU
'numeric'
PlatformWS
'numeric'
PlatformX360
'numeric'
PlatformXB
'numeric'
PlatformXOne
'numeric'
inFranchise
'numeric'
log_sales
'numeric'
In [ ]:
# Training a radnom forests algorithm on sales with a logarithmic transform #
# And with only numeric data
print("Random Forests: with only numeric data")
dt_log_numeric <- DT_log_data(games_keep_outliers)

dt_log_numeric$train <- dt_log_numeric$train %>% select(-c("CriticScore", "UserScore", "Publisher", "Rating", "ReleaseDate", "Name", "Developer"))

# sapply(dt_log_numeric$train, class)

output.forest_log_numeric <- randomForest(log_sales~., data = dt_log_numeric$train)
print(output.forest_log_numeric)
print(importance(output.forest_log_numeric), 2)
[1] "Random Forests: with only numeric data"

Call:
 randomForest(formula = log_sales ~ ., data = dt_log_numeric$train) 
               Type of random forest: regression
                     Number of trees: 500
No. of variables tried at each split: 18

          Mean of squared residuals: 0.1608978
                    % Var explained: 57.45
                                  IncNodePurity
CriticCount                               201.4
UserCount                                 266.9
YearofRelease                              18.6
NorthernAmerica_ageMedian                  17.9
NorthernAmerica_femaleRatioMedian          23.3
Japan_ageMedian                            17.9
Japan_femaleRatioMedian                    19.1
Europe_ageMedian                           18.3
Europe_femaleRatioMedian                   20.8
Other_ageMedian                            17.7
Other_femaleRatioMedian                    19.5
GenreAction                                11.0
GenreAdventure                              6.0
GenreFighting                               5.5
GenreMisc                                  13.3
GenrePlatform                               7.8
GenrePuzzle                                 4.7
GenreRacing                                 7.7
GenreRole.Playing                          10.2
GenreShooter                               13.5
GenreSimulation                            12.3
GenreSports                                14.5
GenreStrategy                              15.1
Platform2600                                0.0
Platform3DO                                 0.0
Platform3DS                                 2.6
PlatformDC                                  0.0
PlatformDS                                  6.8
PlatformGB                                  0.0
PlatformGBA                                 0.0
PlatformGC                                  0.0
PlatformGEN                                 0.0
PlatformGG                                  0.0
PlatformN64                                 0.0
PlatformNES                                 0.0
PlatformNG                                  0.0
PlatformPC                                148.5
PlatformPCFX                                0.0
PlatformPS                                  0.0
PlatformPS2                                 7.8
PlatformPS3                                 8.9
PlatformPS4                                 2.7
PlatformPSP                                 0.0
PlatformPSV                                 0.0
PlatformSAT                                 0.0
PlatformSCD                                 0.0
PlatformSNES                                0.0
PlatformTG16                                0.0
PlatformWii                                 8.1
PlatformWiiU                                2.5
PlatformWS                                  0.0
PlatformX360                                9.6
PlatformXB                                  0.0
PlatformXOne                                2.3
inFranchise                                63.4
In [ ]:
treeList <- RF2List(output.forest_log_numeric)
exec <- extractRules(treeList, dt_log_numeric$train)  # R-executable conditions
5255 rules (length<=6) were extracted from the first 100 trees.
In [ ]:
names(dt_game_data$test)

# Getting the rules and sorting them by prediction to get the best prediction
asdf <- as.data.frame(getRuleMetric(exec, dt_game_data$test, dt_game_data$test$GlobalSales))
asdf %>% arrange(pred)
  1. 'GlobalSales'
  2. 'Rating'
  3. 'YearofRelease'
  4. 'NorthernAmerica_ageMedian'
  5. 'NorthernAmerica_femaleRatioMedian'
  6. 'Japan_ageMedian'
  7. 'Japan_femaleRatioMedian'
  8. 'Europe_ageMedian'
  9. 'Europe_femaleRatioMedian'
  10. 'Other_ageMedian'
  11. 'Other_femaleRatioMedian'
  12. 'GenreAction'
  13. 'GenreAdventure'
  14. 'GenreFighting'
  15. 'GenreMisc'
  16. 'GenrePlatform'
  17. 'GenrePuzzle'
  18. 'GenreRacing'
  19. 'GenreRole.Playing'
  20. 'GenreShooter'
  21. 'GenreSimulation'
  22. 'GenreSports'
  23. 'GenreStrategy'
  24. 'Platform2600'
  25. 'Platform3DO'
  26. 'Platform3DS'
  27. 'PlatformDC'
  28. 'PlatformDS'
  29. 'PlatformGB'
  30. 'PlatformGBA'
  31. 'PlatformGC'
  32. 'PlatformGEN'
  33. 'PlatformGG'
  34. 'PlatformN64'
  35. 'PlatformNES'
  36. 'PlatformNG'
  37. 'PlatformPC'
  38. 'PlatformPCFX'
  39. 'PlatformPS'
  40. 'PlatformPS2'
  41. 'PlatformPS3'
  42. 'PlatformPS4'
  43. 'PlatformPSP'
  44. 'PlatformPSV'
  45. 'PlatformSAT'
  46. 'PlatformSCD'
  47. 'PlatformSNES'
  48. 'PlatformTG16'
  49. 'PlatformWii'
  50. 'PlatformWiiU'
  51. 'PlatformWS'
  52. 'PlatformX360'
  53. 'PlatformXB'
  54. 'PlatformXOne'
  55. 'inFranchise'
[1] "3872 paths are ignored."
A data.frame: 1383 × 5
lenfreqerrconditionpred
<chr><chr><chr><chr><chr>
50 0 X[,1]<=35.5 & X[,4]>39.65 & X[,26]>0.5 & X[,37]<=0.5 & X[,55]<=0.5 0.01
60.0012.5e-05 X[,1]<=39.5 & X[,5]<=50.4730558395386 & X[,10]<=26.1 & X[,12]>0.5 & X[,13]<=0.5 & X[,37]>0.5 0.015
60.0012.5e-05 X[,2]>170.5 & X[,2]>645 & X[,6]>44.05 & X[,8]>40.6 & X[,12]>0.5 & X[,37]>0.5 0.015
50.0018.88888888888889e-05X[,1]<=36.5 & X[,10]>24.85 & X[,17]>0.5 & X[,23]<=0.5 & X[,37]<=0.5 0.0166666666666667
50 0 X[,1]<=39.5 & X[,5]<=50.4730558395386 & X[,22]>0.5 & X[,37]<=0.5 & X[,55]<=0.5 0.02
60.0016.66666666666667e-05X[,7]<=51.0788860321045 & X[,8]<=37.55 & X[,9]<=51.2545566558838 & X[,9]>51.1202640533447 & X[,20]>0.5 & X[,37]>0.5 0.02
60.0010 X[,7]<=51.0788860321045 & X[,8]>37.55 & X[,9]<=51.2545566558838 & X[,9]>51.1202640533447 & X[,20]>0.5 & X[,37]>0.5 0.02
60 0 X[,5]<=50.5818138122559 & X[,6]<=44.05 & X[,9]<=51.0050449371338 & X[,21]>0.5 & X[,37]>0.5 & X[,55]<=0.5 0.02
60.0014e-05 X[,2]>528.5 & X[,3]>1999 & X[,11]<=50.2310600280762 & X[,11]>50.202018737793 & X[,20]>0.5 & X[,37]>0.5 0.02
60.0015e-05 X[,5]>50.5002746582031 & X[,5]<=50.5211305618286 & X[,7]<=51.1412963867188 & X[,11]>50.137134552002 & X[,13]>0.5 & X[,37]>0.5 0.02
60.0036e-05 X[,6]<=43.7 & X[,7]>50.8362159729004 & X[,9]>50.9503784179688 & X[,20]>0.5 & X[,37]>0.5 & X[,55]<=0.5 0.02
60 0 X[,3]<=2010.5 & X[,7]<=51.1412963867188 & X[,9]<=50.9503784179688 & X[,10]<=24.575 & X[,22]>0.5 & X[,37]>0.5 0.02
60.0010.00016875 X[,6]<=42.6 & X[,6]<=41.6 & X[,7]<=51.0788860321045 & X[,10]>21.475 & X[,12]>0.5 & X[,37]>0.5 0.0225
60.0010.00016875 X[,1]<=40.5 & X[,4]>36.4 & X[,6]<=41.6 & X[,10]<=24 & X[,12]>0.5 & X[,37]>0.5 0.0225
60.0022e-04 X[,2]>86.5 & X[,3]>1997.5 & X[,9]>50.9503784179688 & X[,9]>51.0677623748779 & X[,20]>0.5 & X[,37]>0.5 0.0233333333333333
50.0010.000225 X[,5]>50.5028591156006 & X[,6]<=42.6 & X[,11]>50.1603946685791 & X[,18]>0.5 & X[,37]>0.5 0.025
60.01 0.00022879684418146 X[,5]>50.5166931152344 & X[,7]<=51.0788860321045 & X[,9]<=51.2545566558838 & X[,9]<=51.1202640533447 & X[,37]>0.5 & X[,55]<=0.50.0261538461538462
60.0010.000155555555555556X[,3]>2015.5 & X[,3]<=2017.5 & X[,18]>0.5 & X[,23]<=0.5 & X[,37]<=0.5 & X[,54]>0.5 0.0266666666666667
60.0010.000155555555555556X[,1]<=51.5 & X[,3]>2001.5 & X[,7]<=50.9448070526123 & X[,8]<=39.1 & X[,37]>0.5 & X[,55]<=0.5 0.0266666666666667
50.0010.000288888888888889X[,1]<=40.5 & X[,4]<=36.4 & X[,10]<=24 & X[,21]>0.5 & X[,37]>0.5 0.0266666666666667
60.0040.000440816326530612X[,1]<=36.5 & X[,2]>27.5 & X[,9]>50.9503784179688 & X[,20]>0.5 & X[,37]>0.5 & X[,55]<=0.5 0.0285714285714286
50 0 X[,3]>2015.5 & X[,3]<=2017.5 & X[,18]>0.5 & X[,23]<=0.5 & X[,37]>0.5 0.03
60 0 X[,2]>59.5 & X[,2]>186 & X[,5]<=50.4730558395386 & X[,18]>0.5 & X[,23]<=0.5 & X[,37]>0.5 0.03
50.0010.000466666666666667X[,1]<=51.5 & X[,1]<=29 & X[,3]<=2001.5 & X[,10]>21.15 & X[,37]>0.5 0.03
60.0030.000309090909090909X[,3]>1997 & X[,8]<=39.1 & X[,21]>0.5 & X[,23]<=0.5 & X[,37]>0.5 & X[,55]<=0.5 0.03
60 0 X[,1]<=35.5 & X[,3]>2014.5 & X[,7]>51.0625972747803 & X[,7]<=51.1412963867188 & X[,18]>0.5 & X[,37]>0.5 0.03
60.0012e-04 X[,1]<=39.5 & X[,6]>42.25 & X[,8]>40.6 & X[,18]>0.5 & X[,20]<=0.5 & X[,55]<=0.5 0.03
50.0014e-04 X[,5]>50.5685214996338 & X[,7]<=51.0788860321045 & X[,23]>0.5 & X[,37]>0.5 & X[,55]<=0.5 0.03
60 0 X[,1]<=40.5 & X[,8]>40.6 & X[,18]>0.5 & X[,20]<=0.5 & X[,37]>0.5 & X[,40]<=0.5 0.03
50.0010.000376 X[,7]<=51.0788860321045 & X[,8]>36.55 & X[,10]<=21.475 & X[,19]<=0.5 & X[,37]>0.5 0.032
⋮⋮⋮⋮⋮
60.0020.796622222222221X[,1]<=40.5 & X[,1]<=26.5 & X[,1]>12.5 & X[,4]<=39.65 & X[,37]<=0.5 & X[,40]<=0.5 13.5266666666667
60.0010.5625 X[,1]<=35.5 & X[,1]>13.5 & X[,2]>44.5 & X[,2]>284 & X[,37]<=0.5 & X[,40]<=0.5 14.54
60 0 X[,1]<=36.5 & X[,1]>14.5 & X[,2]>1632.5 & X[,8]<=40.6 & X[,12]<=0.5 & X[,55]<=0.5 15.29
60 0 X[,1]<=65.5 & X[,1]>12.5 & X[,2]>27.5 & X[,7]<=51.1412963867188 & X[,37]<=0.5 & X[,55]<=0.5 15.29
60 0 X[,1]<=36.5 & X[,1]>14.5 & X[,6]>41.6 & X[,22]<=0.5 & X[,37]<=0.5 & X[,55]<=0.5 15.29
60 0 X[,1]<=44.5 & X[,1]>14.5 & X[,5]<=50.5685214996338 & X[,7]<=51.1412963867188 & X[,37]<=0.5 & X[,55]<=0.515.29
60 0 X[,1]<=40.5 & X[,1]>14.5 & X[,2]>27.5 & X[,5]>50.5250577926636 & X[,8]<=40.6 & X[,37]<=0.5 15.29
60 0 X[,1]<=40.5 & X[,1]>14.5 & X[,2]>74.5 & X[,2]>432 & X[,7]>50.9448070526123 & X[,37]<=0.5 15.29
60 0 X[,1]<=40.5 & X[,1]>15 & X[,2]>44.5 & X[,2]>432 & X[,6]<=46.1 & X[,37]<=0.5 15.29
60 0 X[,1]<=36.5 & X[,1]>13.5 & X[,1]<=34.5 & X[,2]>77.5 & X[,37]<=0.5 & X[,55]<=0.5 15.29
60 0 X[,1]<=40.5 & X[,1]>14.5 & X[,2]>35.5 & X[,3]>2004.5 & X[,10]<=25.475 & X[,37]<=0.5 15.29
50.0010.1764 X[,1]<=55.5 & X[,4]<=33.95 & X[,9]>50.9503784179688 & X[,37]>0.5 & X[,55]<=0.5 2.01
50.0010.1764 X[,1]<=36.5 & X[,2]>224.5 & X[,7]<=50.8362159729004 & X[,37]>0.5 & X[,55]<=0.5 2.01
50.0010.1764 X[,1]<=55.5 & X[,7]<=50.8362159729004 & X[,9]>50.9503784179688 & X[,37]>0.5 & X[,55]<=0.5 2.01
60.0010.1764 X[,1]<=39.5 & X[,5]>50.4730558395386 & X[,10]<=20.275 & X[,37]>0.5 & X[,40]<=0.5 & X[,55]<=0.5 2.01
50.0010.1764 X[,3]<=1997 & X[,8]<=39.1 & X[,23]<=0.5 & X[,37]>0.5 & X[,55]<=0.5 2.01
60.0010.1764 X[,1]<=40.5 & X[,3]<=1997.5 & X[,6]<=44.05 & X[,10]<=25.475 & X[,37]>0.5 & X[,55]<=0.5 2.01
40.0010.1764 X[,7]<=50.8362159729004 & X[,9]>50.9503784179688 & X[,37]>0.5 & X[,55]<=0.5 2.01
60.0010.1764 X[,1]<=39.5 & X[,1]<=18 & X[,10]<=25.475 & X[,11]>50.2310600280762 & X[,37]>0.5 & X[,55]<=0.5 2.01
60.0012.5658 X[,1]<=36.5 & X[,2]>24.5 & X[,6]<=42.1 & X[,21]>0.5 & X[,37]>0.5 & X[,55]>0.5 2.3
60 0 X[,1]<=40.5 & X[,2]>45 & X[,4]<=38.6 & X[,7]<=50.9448070526123 & X[,13]>0.5 & X[,37]>0.5 2.43
60.0024.71385555555556 X[,2]>559.5 & X[,10]<=24.575 & X[,19]>0.5 & X[,37]>0.5 & X[,41]<=0.5 & X[,55]>0.5 2.46666666666667
60.0024.71385555555556 X[,2]>559.5 & X[,4]<=39.2 & X[,5]>50.4730558395386 & X[,19]>0.5 & X[,37]>0.5 & X[,55]>0.5 2.46666666666667
50.0012.1609 X[,1]<=36.5 & X[,19]>0.5 & X[,37]<=0.5 & X[,54]>0.5 & X[,55]>0.5 2.75
60.00521.45029275 X[,1]<=40.5 & X[,19]<=0.5 & X[,20]>0.5 & X[,23]<=0.5 & X[,41]>0.5 & X[,55]>0.5 3.3135
60.00111.0889 X[,1]<=39.5 & X[,5]<=50.4730558395386 & X[,22]>0.5 & X[,37]<=0.5 & X[,42]>0.5 & X[,55]>0.5 4.26
40 0 X[,5]>50.5166931152344 & X[,19]>0.5 & X[,37]>0.5 & X[,55]>0.5 6.29
60 0 X[,1]<=40.5 & X[,1]<=16.5 & X[,1]>5 & X[,2]>8.5 & X[,6]>46.1 & X[,12]<=0.5 7.59
60.0011.316464 X[,1]<=44.5 & X[,1]<=15.5 & X[,1]>6.5 & X[,11]>50.1264724731445 & X[,37]<=0.5 & X[,52]>0.5 8.376
60.0010.588466666666666X[,1]<=55.5 & X[,1]>5.5 & X[,4]<=39.55 & X[,8]>38 & X[,15]>0.5 & X[,55]>0.5 9.1
In [ ]:
# Making predictions with random forests
p1 <- predict(output.forest, dt_game_data$test)
comparison <- data.frame(dt_game_data$test$GlobalSales)

data.frame(dt_game_data$test$log_sales)
comparison$predicted <- p1
 

# Making predictions with logarithmic random forests
p2 <- predict(output.forest_log, dt_log_game_data$test)
comparison_log <- data.frame(dt_log_game_data$test$log_sales)

comparison_log$predicted <- p2
 
names(comparison)

# Plotting the predictions against the best fit line
ggplot(data.frame(pred = comparison$predicted, GlobalSales = comparison$dt_game_data.test.GlobalSales)) +
  geom_point(aes(x = pred, y = GlobalSales)) +
  geom_abline(intercept = 0, slope = 1, color = "blue")

ggplot(data.frame(pred = comparison_log$predicted, log_sales = comparison_log$dt_log_game_data.test.log_sales)) +
  geom_point(aes(x = pred, y = log_sales)) +
  geom_abline(intercept = 0, slope = 1, color = "blue")
  1. 'dt_game_data.test.GlobalSales'
  2. 'predicted'
In [ ]:
# Uploading igraph
pacman::p_unload("igraph")
The following packages were not previously loaded:
igraph



Time series¶

In [ ]:
names(games_keep_outliers)
  1. 'Name'
  2. 'Publisher'
  3. 'NASales'
  4. 'EUSales'
  5. 'JPSales'
  6. 'OtherSales'
  7. 'GlobalSales'
  8. 'CriticCount'
  9. 'UserCount'
  10. 'Developer'
  11. 'Rating'
  12. 'ReleaseDate'
  13. 'YearofRelease'
  14. 'CriticScore'
  15. 'UserScore'
  16. 'NorthernAmerica_ageMedian'
  17. 'NorthernAmerica_femaleRatioMedian'
  18. 'Japan_ageMedian'
  19. 'Japan_femaleRatioMedian'
  20. 'Europe_ageMedian'
  21. 'Europe_femaleRatioMedian'
  22. 'Other_ageMedian'
  23. 'Other_femaleRatioMedian'
  24. 'GenreAction'
  25. 'GenreAdventure'
  26. 'GenreFighting'
  27. 'GenreMisc'
  28. 'GenrePlatform'
  29. 'GenrePuzzle'
  30. 'GenreRacing'
  31. 'GenreRole.Playing'
  32. 'GenreShooter'
  33. 'GenreSimulation'
  34. 'GenreSports'
  35. 'GenreStrategy'
  36. 'Platform2600'
  37. 'Platform3DO'
  38. 'Platform3DS'
  39. 'PlatformDC'
  40. 'PlatformDS'
  41. 'PlatformGB'
  42. 'PlatformGBA'
  43. 'PlatformGC'
  44. 'PlatformGEN'
  45. 'PlatformGG'
  46. 'PlatformN64'
  47. 'PlatformNES'
  48. 'PlatformNG'
  49. 'PlatformPC'
  50. 'PlatformPCFX'
  51. 'PlatformPS'
  52. 'PlatformPS2'
  53. 'PlatformPS3'
  54. 'PlatformPS4'
  55. 'PlatformPSP'
  56. 'PlatformPSV'
  57. 'PlatformSAT'
  58. 'PlatformSCD'
  59. 'PlatformSNES'
  60. 'PlatformTG16'
  61. 'PlatformWii'
  62. 'PlatformWiiU'
  63. 'PlatformWS'
  64. 'PlatformX360'
  65. 'PlatformXB'
  66. 'PlatformXOne'
  67. 'inFranchise'
In [ ]:
TimeSeriesData <- games_TS[, c("ReleaseDate", "Platform", "Genre", "GlobalSales")]
In [ ]:
# Training timeseries graph
GENRE = "Racing"
timeSeries = createTimeSeries(TimeSeriesData, GENRE)
plotTimeSeriesForGenre(TimeSeriesData, GENRE)
plotDecomposedTimeSeries(timeSeries, GENRE)
In [ ]:
# Creating time series dataset
dataset<-N_createTimeSeriesDataSet(timeSeries)
In [ ]:
# Time Delay Neural Network (TDNN)
N_DEEP_Initialise()

# Trains a neural network
outputFieldName=paste("V",TIME_SLOTS,sep="")

# Train and test subset
train<-subset(dataset$train,select=-means)
test<-subset(dataset$test,select=-means)

# Training a network
deep<-N_DEEP_Train(train=train,
                     fieldNameOutput=outputFieldName,
                     hidden=DEEP_HIDDEN,
                     stopping_rounds=DEEP_STOPPING,
                     stopping_tolerance=DEEP_TOLERANCE,
                     activation=DEEP_ACTIVATION,
                     reproducible=DEEP_REPRODUCABLE,
                     regression=TRUE)

summary(deep)
plot(deep)  # plots the scoring history
[1] "Initialise the H2O server"
 Connection successful!

R is connected to the H2O cluster: 
    H2O cluster uptime:         14 minutes 28 seconds 
    H2O cluster timezone:       Etc/UTC 
    H2O data parsing timezone:  UTC 
    H2O cluster version:        3.38.0.1 
    H2O cluster version age:    2 months and 9 days  
    H2O cluster name:           H2O_started_from_R_root_hfi876 
    H2O cluster total nodes:    1 
    H2O cluster total memory:   3.17 GB 
    H2O cluster total cores:    2 
    H2O cluster allowed cores:  1 
    H2O cluster healthy:        TRUE 
    H2O Connection ip:          localhost 
    H2O Connection port:        54321 
    H2O Connection proxy:       NA 
    H2O Internal Security:      FALSE 
    R Version:                  R version 4.2.2 Patched (2022-11-10 r83330) 

Model Details:
==============

H2ORegressionModel: deeplearning
Model Key:  DeepLearning_model_R_1669646843908_2 
Status of Neuron Layers: predicting V10, regression, gaussian distribution, Quadratic loss, 621 weights/biases, 12.6 KB, 10,858 training samples, mini-batch size 1
  layer units   type dropout       l1       l2 mean_rate rate_rms momentum
1     1     9  Input  0.00 %       NA       NA        NA       NA       NA
2     2    30   Tanh  0.00 % 0.010000 0.010000  0.005002 0.011129 0.000000
3     3    10   Tanh  0.00 % 0.010000 0.010000  0.025730 0.028299 0.000000
4     4     1 Linear      NA 0.010000 0.010000  0.021774 0.025846 0.000000
  mean_weight weight_rms mean_bias bias_rms
1          NA         NA        NA       NA
2    0.008284   0.114584 -0.006031 0.020394
3   -0.000621   0.091974  0.015833 0.034786
4    0.031304   0.342272 -0.060012 0.000000

H2ORegressionMetrics: deeplearning
** Reported on training data. **
** Metrics reported on full training frame **

MSE:  0.03861056
RMSE:  0.1964957
MAE:  0.1534003
RMSLE:  0.147292
Mean Residual Deviance :  0.03861056


H2ORegressionMetrics: deeplearning
** Reported on validation data. **
** Metrics reported on full validation frame **

MSE:  0.02584674
RMSE:  0.1607692
MAE:  0.1109846
RMSLE:  0.1181055
Mean Residual Deviance :  0.02584674




Scoring History: 
            timestamp   duration training_speed  epochs iterations    samples
1 2022-11-28 15:01:59  0.000 sec             NA 0.00000          0   0.000000
2 2022-11-28 15:01:59  0.031 sec  11090 obs/sec 1.00000          1 122.000000
3 2022-11-28 15:01:59  0.050 sec   9037 obs/sec 2.00000          2 244.000000
4 2022-11-28 15:01:59  0.067 sec   8714 obs/sec 3.00000          3 366.000000
5 2022-11-28 15:01:59  0.086 sec   8714 obs/sec 4.00000          4 488.000000
  training_rmse training_deviance training_mae training_r2 validation_rmse
1            NA                NA           NA          NA              NA
2       0.22837           0.05215      0.18196    -0.18155         0.17076
3       0.21371           0.04567      0.17117    -0.03478         0.17185
4       0.20697           0.04284      0.16496     0.02948         0.17283
5       0.20373           0.04150      0.16220     0.05967         0.17011
  validation_deviance validation_mae validation_r2
1                  NA             NA            NA
2             0.02916        0.11637      -0.14040
3             0.02953        0.12086      -0.15504
4             0.02987        0.12029      -0.16823
5             0.02894        0.11797      -0.13174

---
             timestamp   duration training_speed   epochs iterations
86 2022-11-28 15:02:00  1.292 sec  10443 obs/sec 85.00000         85
87 2022-11-28 15:02:00  1.306 sec  10450 obs/sec 86.00000         86
88 2022-11-28 15:02:00  1.319 sec  10457 obs/sec 87.00000         87
89 2022-11-28 15:02:00  1.333 sec  10453 obs/sec 88.00000         88
90 2022-11-28 15:02:00  1.349 sec  10440 obs/sec 89.00000         89
91 2022-11-28 15:02:00  1.372 sec  10243 obs/sec 89.00000         89
        samples training_rmse training_deviance training_mae training_r2
86 10370.000000       0.19784           0.03914      0.15470     0.11320
87 10492.000000       0.19786           0.03915      0.15533     0.11300
88 10614.000000       0.19791           0.03917      0.15571     0.11259
89 10736.000000       0.19796           0.03919      0.15578     0.11213
90 10858.000000       0.19810           0.03924      0.15531     0.11090
91 10858.000000       0.19650           0.03861      0.15340     0.12523
   validation_rmse validation_deviance validation_mae validation_r2
86         0.16197             0.02623        0.11215      -0.02601
87         0.16318             0.02663        0.11435      -0.04142
88         0.16349             0.02673        0.11494      -0.04531
89         0.16392             0.02687        0.11500      -0.05082
90         0.16247             0.02640        0.11272      -0.03237
91         0.16077             0.02585        0.11098      -0.01084

Variable Importances: (Extract with `h2o.varimp`) 
=================================================

Variable Importances: 
  variable relative_importance scaled_importance percentage
1       V5            1.000000          1.000000   0.160327
2       V6            0.907421          0.907421   0.145484
3       V3            0.750395          0.750395   0.120309
4       V8            0.700694          0.700694   0.112340
5       V2            0.695867          0.695867   0.111566
6       V7            0.644100          0.644100   0.103267
7       V1            0.591363          0.591363   0.094811
8       V9            0.535508          0.535508   0.085856
9       V4            0.411903          0.411903   0.066039
In [ ]:
# Evaluating the network
predictions<-N_EVALUATE_DeepNeural(test=test,
                                     fieldNameOutput=outputFieldName,
                                     deep=deep,
                                     regression=TRUE)

head(predictions)
  1. 0.165542528212714
  2. 0.245012040286254
  3. 0.317807166862952
  4. 0.297924597814893
  5. 0.271484285028368
  6. 0.223412863295399
In [ ]:
# Actual outputs
actual<-test[,outputFieldName]

# Visualizing time series results
real_exp_pred<-N_visualiseTimeSeriesResults(actual=actual,
                                          predicted=predictions,
                                          means=dataset$test$means,
                                          dates=rownames(dataset$test),
                                          realmin=dataset$min,
                                          realmax=dataset$max,
                                          title="Deep NN Windowed Test Dataset",
                                          yaxis_title=c("actual","Predicted"),
                                          measuresFLag=TRUE)
In [ ]:
# Getting the table of actual and predicted
tidyTable<-data.frame(tail(real_exp_pred))
tidyTable<-cbind(tidyTable,data.frame(error=tidyTable$actual-tidyTable$predicted))
tidyTable$percent<-round((tidyTable$error/tidyTable$actual)*100,digits=2)
head(tidyTable)
A data.frame: 6 × 4
actualpredictederrorpercent
<dbl><dbl><dbl><dbl>
2016-09-130.100.07164477 0.02835523 28.36
2016-09-210.180.11859007 0.06140993 34.12
2016-10-070.020.08410725-0.06410725-320.54
2016-10-110.100.13872551-0.03872551 -38.73
2017-02-140.100.13288844-0.03288844 -32.89
2019-10-080.080.10567934-0.02567934 -32.10
In [ ]:
# Plotting time series for genres
for (genre in unique(games$Genre)) {
  timeSeries = createTimeSeries(TimeSeriesData, genre)
  plotDecomposedTimeSeries(timeSeries, genre)
}
In [ ]:
# Making time series for Rating
TimeSeriesGenre = subset(TimeSeriesData, TimeSeriesData$Genre == "Racing")
timeSeries <- createTimeSeries(TimeSeriesGenre, "Racing")
finalTimeSeries <- as.timeSeries(timeSeries)
tsGlobalSales = ts(finalTimeSeries, frequency  = 365/12) #monthly / seasonal
decomposeGlobalSales = decompose(tsGlobalSales, "multiplicative")
plot(decomposeGlobalSales$seasonal, main = paste("Global Sales seasonal trend for", "Racing"))
In [ ]:
# Plotting time series for different genres
genres <- c("Action", "Racing", "Platform", "Role-Playing", "Misc", "Simulation")
for (genre in genres) {
  plotTimeSeriesForGenre(TimeSeriesData, genre)
}
In [ ]: